diff --git a/hosts/skrot/configuration.nix b/hosts/skrot/configuration.nix index fcc0000..baa745d 100644 --- a/hosts/skrot/configuration.nix +++ b/hosts/skrot/configuration.nix @@ -12,6 +12,8 @@ ./hardware-configuration.nix ./disk-config.nix (fp /base) + + ./services/drumknotty.nix ]; boot.consoleLogLevel = 0; @@ -26,59 +28,6 @@ ]; }; - sops.secrets = { - "dibbler/postgresql/password" = { - owner = "drumknotty"; - group = "drumknotty"; - }; - "worblehat/postgresql/password" = { - owner = "drumknotty"; - group = "drumknotty"; - }; - }; - - services.drumknotty = { - enable = true; - kioskMode = true; - - screen = { - limitWidth = 80; - limitHeight = 42; - }; - - dibbler = { - enable = true; - settings = { - general.quit_allowed = false; - database = { - type = "postgresql"; - postgresql = { - username = "pvv_vv"; - dbname = "pvv_vv"; - host = "postgres.pvv.ntnu.no"; - password_file = config.sops.secrets."dibbler/postgresql/password".path; - }; - }; - }; - }; - - worblehat = { - enable = true; - settings = { - general.quit_allowed = false; - database = { - type = "postgresql"; - postgresql = { - username = "worblehat"; - dbname = "worblehat"; - host = "postgres.pvv.ntnu.no"; - password = config.sops.secrets."worblehat/postgresql/password".path; - }; - }; - }; - }; - }; - systemd.services."serial-getty@ttyUSB0" = lib.mkIf (!config.virtualisation.isVmVariant) { enable = true; wantedBy = [ "getty.target" ]; # to start at boot diff --git a/hosts/skrot/services/drumknotty.nix b/hosts/skrot/services/drumknotty.nix new file mode 100644 index 0000000..c03352e --- /dev/null +++ b/hosts/skrot/services/drumknotty.nix @@ -0,0 +1,55 @@ +{ config, ... }: +{ + sops.secrets = { + "dibbler/postgresql/password" = { + owner = "drumknotty"; + group = "drumknotty"; + }; + "worblehat/postgresql/password" = { + owner = "drumknotty"; + group = "drumknotty"; + }; + }; + + services.drumknotty = { + enable = true; + kioskMode = true; + + screen = { + limitWidth = 80; + limitHeight = 42; + }; + + dibbler = { + enable = true; + settings = { + general.quit_allowed = false; + database = { + type = "postgresql"; + postgresql = { + username = "pvv_vv"; + dbname = "pvv_vv"; + host = "postgres.pvv.ntnu.no"; + password_file = config.sops.secrets."dibbler/postgresql/password".path; + }; + }; + }; + }; + + worblehat = { + enable = true; + settings = { + general.quit_allowed = false; + database = { + type = "postgresql"; + postgresql = { + username = "worblehat"; + dbname = "worblehat"; + host = "postgres.pvv.ntnu.no"; + password = config.sops.secrets."worblehat/postgresql/password".path; + }; + }; + }; + }; + }; +}