mirror of https://github.com/Chizi123/Dotfiles.git

22bc76a0fc5eda6735fe7711a8afc330fe44e5ca..10b8f48901bee78e1f59e92eee2076a63b79a903
yesterday Joel Grunbaum
Enable neovim
10b8f4 diff | tree
yesterday Joel Grunbaum
Enable bluetooth
725596 diff | tree
yesterday Joel Grunbaum
Use zigbee2mqtt
b770ff diff | tree
3 files modified
1 files added
66 ■■■■■ changed files
nixos/home-assistant.nix 55 ●●●●● patch | view | raw | blame | history
nixos/neovim.nix 6 ●●●●● patch | view | raw | blame | history
smini/configuration.nix 1 ●●●● patch | view | raw | blame | history
smini/hardware-configuration.nix 4 ●●●● patch | view | raw | blame | history
nixos/home-assistant.nix
@@ -1,6 +1,23 @@
{ config, libs, pkgs, modulesPath, ... }:
let
  unstable = import <nixos-unstable> {};
in
{
  nixpkgs.overlays = [
    (self: super: {
      inherit (unstable) home-assistant;
    })
  ];
  disabledModules = [
    "services/home-automation/home-assistant.nix"
  ];
  imports = [
    <nixos-unstable/nixos/modules/services/home-automation/home-assistant.nix>
  ];
  services.home-assistant = {
    enable = true;
    extraComponents = [
@@ -13,10 +30,11 @@
      # Recommended for fast zlib compression
      # https://www.home-assistant.io/integrations/isal
      "isal"
      "zha"
      "mqtt"
      "plex"
      "braviatv"
      "roku"
      "unifi"
    ];
    config = {
      # Includes dependencies for a basic setup
@@ -32,6 +50,41 @@
      };
    };
  };
  services.mosquitto = {
    enable = true;
    listeners = [
      {
        acl = [ "pattern readwrite #" ];
        omitPasswordAuth = true;
        settings.allow_anonymous = true;
      }
    ];
  };
  services.zigbee2mqtt = {
    enable = true;
    settings = {
      homeassistant = true;
      permit_join = true;
      mqtt = {
        base_topic = "zigbee2mqtt";
        server = "mqtt://127.0.0.1:1883";
      };
      serial = {
        port = "/dev/ttyUSB0";
        adapter = "ember";
      };
      frontend = {
        enabled = true;
        port = 18080;
        host = "0.0.0.0";
      };
    };
  };
#  networking.firewall.allowedTCPPorts = [ 18080 ];
  services.nginx.virtualHosts."home.ush.bouncr.xyz" = {
    extraConfig = ''
        proxy_buffering off;
nixos/neovim.nix
New file
@@ -0,0 +1,6 @@
{
  programs.neovim = {
    enable = true;
    defaultEditor = true;
  };
}
smini/configuration.nix
@@ -15,6 +15,7 @@
      ../nixos/btrfs.nix
      ../nixos/nginx.nix
      ../nixos/home-assistant.nix
      ../nixos/neovim.nix
    ];
  # Bootloader.
smini/hardware-configuration.nix
@@ -34,6 +34,10 @@
  networking.useDHCP = lib.mkDefault true;
  # networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
  # networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
  hardware.bluetooth = {
    enable = true;
    powerOnBoot = true;
  };
  nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
  hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;