diff --git a/hosts/arcturus/default.nix b/hosts/arcturus/default.nix index 0779ae1..6bd53fe 100644 --- a/hosts/arcturus/default.nix +++ b/hosts/arcturus/default.nix @@ -23,6 +23,7 @@ networking = { useNetworkd = false; + networkmanager.enable = false; useDHCP = false; nftables.enable = true; @@ -92,6 +93,7 @@ Gateway = "10.16.1.1"; DNS = ["10.16.1.1"]; LinkLocalAddressing = "no"; + DHCP = "no"; }; linkConfig.RequiredForOnline = "routable"; }; diff --git a/snow.nix b/snow.nix index 0be6e6b..4f03787 100644 --- a/snow.nix +++ b/snow.nix @@ -78,7 +78,7 @@ cerulean.mkNexus ./. (self: { { image = "/var/lib/microvms/home-assistant/data.img"; mountPoint = "/var/lib/hass"; - size = 16384; # 16GB + autoCreate = false; } ]; }; diff --git a/vms/home-assistant/default.nix b/vms/home-assistant/default.nix index 17ad40c..70bcd07 100644 --- a/vms/home-assistant/default.nix +++ b/vms/home-assistant/default.nix @@ -2,7 +2,7 @@ { services.home-assistant = { enable = true; - configDir = "/var/lib/hass"; + configDir = "/var/lib/hass/hass"; # disables config generation, i don't wanna configure home assistant # through nix at the moment @@ -16,15 +16,32 @@ extraPackages = python3Packages: with python3Packages; [ getmac + aiohue + numpy + aiodhcpwatcher + async-upnp-client + gtts + numpy + plexapi + pyipp + paho-mqtt + pyturbojpeg ]; }; - systemd.tmpfiles.rules = [ - # configures the config directory to be mounted - # correclty with the right permissions - "z /var/lib/hass 0755 hass hass -" - "z /var/lib/hass/lost+found 0755 hass hass -" - ]; + # configures the config directory to be mounted + # correctly with the right permissions + systemd.services.hass-permissions = { + wantedBy = [ "multi-user.target" ]; + after = [ "var-lib-hass.mount" ]; + requires = [ "var-lib-hass.mount" ]; + before = [ "home-assistant.service" ]; + serviceConfig = { + Type = "oneshot"; + ExecStart = "${pkgs.bash}/bin/bash -c 'mkdir -p /var/lib/hass/hass && chown hass:hass /var/lib/hass/hass'"; + RemainAfterExit = true; + }; + }; networking = { nftables.enable = true;