diff --git a/home.nix b/home.nix index 42256783..a531a392 100644 --- a/home.nix +++ b/home.nix @@ -93,5 +93,13 @@ in { (setStartpage "https://stats.maralorn.de/d/health-status") ]; - hera = { }; + hera = makeConfig "hera" [ + ./home + home/on-my-machine.nix + hosts/hera/weechat + hosts/hera/secret + home/kassandra.nix + home/headless-mpd.nix + home/mail.nix + ]; } diff --git a/home/headless-mpd.nix b/home/headless-mpd.nix new file mode 100644 index 00000000..fd333af7 --- /dev/null +++ b/home/headless-mpd.nix @@ -0,0 +1,21 @@ +{ ... }: { + services = { + mpd = { + enable = true; + network.listenAddress = "::1"; + musicDirectory = "/media/audio"; + extraConfig = '' + audio_output { + type "httpd" + name "HTTP Stream" + encoder "vorbis" + port "8666" + bitrate "192" + format "44100:16:1" + always_on "yes" # prevent MPD from disconnecting all listeners when playback is stopped. + tags "yes" # httpd supports sending tags to listening streams. + } + ''; + }; + }; +} diff --git a/home/kassandra.nix b/home/kassandra.nix new file mode 100644 index 00000000..beadde3f --- /dev/null +++ b/home/kassandra.nix @@ -0,0 +1,12 @@ +{ pkgs, ... }: { + systemd.user.services.kassandra = { + Unit = { Description = "Kassandra Server"; }; + Service = { + WorkingDirectory = "/var/www/kassandra"; + ExecStart = "/var/www/kassandra/backend -b '::1' "; + Restart = "always"; + Environment = "PATH=${pkgs.coreutils}/bin/:${pkgs.taskwarrior}/bin"; + }; + Install = { WantedBy = [ "default.target" ]; }; + }; +} diff --git a/hosts/hera/home.nix b/hosts/hera/home.nix deleted file mode 100644 index 4f823837..00000000 --- a/hosts/hera/home.nix +++ /dev/null @@ -1,46 +0,0 @@ -{ pkgs, config, ... }: { - - imports = [ ../../home ../../home/on-my-machine.nix ./weechat ./secret ]; - - m-0 = { - hostName = "hera"; - mail = { - enable = true; - accounts = config.m-0.private.mail_accounts; - }; - }; - services = { - mpd = { - enable = true; - network.listenAddress = "::1"; - musicDirectory = "/media/audio"; - extraConfig = '' - audio_output { - type "httpd" - name "HTTP Stream" - encoder "vorbis" - port "8666" - bitrate "192" - format "44100:16:1" - always_on "yes" # prevent MPD from disconnecting all listeners when playback is stopped. - tags "yes" # httpd supports sending tags to listening streams. - } - ''; - }; - }; - systemd.user = { - services = { - kassandra = { - Unit = { Description = "Kassandra Server"; }; - Service = { - WorkingDirectory = "/var/www/kassandra"; - ExecStart = "/var/www/kassandra/backend -b '::1' "; - Restart = "always"; - Environment = "PATH=${pkgs.coreutils}/bin/:${pkgs.taskwarrior}/bin"; - }; - Install = { WantedBy = [ "default.target" ]; }; - }; - }; - }; - -} diff --git a/lib/test.nix b/lib/test.nix index e9b2ba6f..ac46585f 100644 --- a/lib/test.nix +++ b/lib/test.nix @@ -27,13 +27,20 @@ in rec { name = "test-home-config"; inherit bins; } (haskellBody "home" '' - nix $ ["build", "-f", ""] ++ paths ++ ["--argstr", "confPath", [i|#{configDir}/hosts/#{hostname}/home.nix|], "--argstr", "confAttr", "", "--out-link", [i|result-home-manager-#{hostname}|], "activationPackage"] ++ fmap toString args + nix $ ["build", "-f", ""] ++ paths ++ ["--argstr", "confPath", [i|#{configDir}/home.nix|], "--argstr", "confAttr", hostname, "--out-link", [i|result-home-manager-#{hostname}|], "activationPackage"] ++ fmap toString args ''); repoSrc = "git@hera.m-0.eu:nixos-config"; configPath = "/etc/nixos"; systems = [ "apollo" "hera" ]; - homes = [ "apollo" "hera" "hephaistos" ]; + homes = [ + "apollo-tinkering" + "apollo-leisure" + "apollo-orga" + "apollo-research" + "hera" + "hephaistos" + ]; keys = [ "default" "apollo" "hera" ]; test-config = writeHaskellScript { name = "test-config"; diff --git a/system/test-timer.nix b/system/test-timer.nix index 35075407..098e7c8f 100644 --- a/system/test-timer.nix +++ b/system/test-timer.nix @@ -22,7 +22,7 @@ in { ${test-config}/bin/test-config /run/wrappers/bin/sudo -u ${user} git -C /etc/nixos pull ${update-system}/bin/update-system - /run/wrappers/bin/sudo -u ${user} ${update-home}/bin/update-home + /run/wrappers/bin/sudo -u ${user} ${update-home}/bin/update-home -A hera ''; };