diff --git a/modules/services/dandelion.nix b/modules/services/dandelion.nix index 2383c3d..e048365 100644 --- a/modules/services/dandelion.nix +++ b/modules/services/dandelion.nix @@ -1,7 +1,9 @@ -{ ... }: { +{ ... }: +{ imports = - [(import ./docker.nix)] - ++ [(import ./immich.nix)] - ++ [(import ./nextcloud.nix)] - ++ [(import ./scrutiny.nix)]; + [ (import ./docker.nix) ] + ++ [ (import ./immich.nix) ] + ++ [ (import ./nextcloud.nix) ] + ++ [ (import ./home-assistant.nix) ] + ++ [ (import ./scrutiny.nix) ]; } diff --git a/modules/services/home-assistant.nix b/modules/services/home-assistant.nix new file mode 100644 index 0000000..e5d1991 --- /dev/null +++ b/modules/services/home-assistant.nix @@ -0,0 +1,15 @@ +{ + networking.firewall.allowedTCPPorts = [ 8123 ]; + virtualisation.oci-containers = { + backend = "docker"; + containers.homeassistant = { + volumes = [ "home-assistant:/config" ]; + environment.TZ = "Europe/Amsterdam"; + image = "ghcr.io/home-assistant/home-assistant:stable"; # Warning: if the tag does not change, the image will not be updated + extraOptions = [ + "--network=host" + # "--device=/dev/ttyACM0:/dev/ttyACM0" # Example, change this to match your own hardware + ]; + }; + }; +} diff --git a/modules/services/nextcloud.nix b/modules/services/nextcloud.nix index 9c3edc2..62c7877 100644 --- a/modules/services/nextcloud.nix +++ b/modules/services/nextcloud.nix @@ -1,6 +1,7 @@ -{ ... }: { +{ ... }: +{ services.nextcloud = { - enable = true; + enable = false; config.dbtype = "sqlite"; configureRedis = true; home = "/home/liv/nextcloud"; diff --git a/modules/services/scrutiny.nix b/modules/services/scrutiny.nix index d249682..78c0e04 100644 --- a/modules/services/scrutiny.nix +++ b/modules/services/scrutiny.nix @@ -1,10 +1,12 @@ -{ config, ... }: { +{ config, ... }: +{ services.scrutiny = { enable = true; collector.enable = true; settings.web.listen.port = 8181; settings.notify.urls = [ - "ntfy://${config.liv.variables.ntfyURL}/${config.networking.hostName}" + # "ntfy://${config.liv.variables.ntfyURL}/${config.networking.hostName}" + "ntfy://notify.liv.town/${config.networking.hostName}" ]; }; diff --git a/roles/server.nix b/roles/server.nix index 745a573..7eb2f8a 100644 --- a/roles/server.nix +++ b/roles/server.nix @@ -1,8 +1,16 @@ -{ lib, pkgs, config, username, home-manager, ... }: +{ + lib, + pkgs, + config, + username, + home-manager, + ... +}: with lib; let cfg = config.liv.server; -in { +in +{ options.liv.server = { enable = mkEnableOption "Enable server"; }; @@ -12,9 +20,10 @@ in { pkgs.kitty.terminfo powertop ]; - - services = { + + services = { thermald.enable = true; + vnstat.enable = true; # cpupower-gui.enable = true; # power-profiles-daemon.enable = true;