ctucx.git: nixfiles

ctucx' nixfiles

commit 348d546154f2ee2b021c0eae67e4b0652e684219
parent 2fc39549f37804413ebf0ae564ba910ad8740b2e
Author: Leah (ctucx) <leah@ctu.cx>
Date: Sat, 12 Feb 2022 09:47:28 +0100

machines/lollo:add shairport-sync
2 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/machines/lollo/configuration.nix b/machines/lollo/configuration.nix
@@ -13,6 +13,8 @@
 
     ../../configurations/services/pipewire.nix
     ../../configurations/services/spotifyd.nix
+    ./shairport-sync.nix
+
     ../../configurations/services/restic-server.nix
     ./syncthing.nix
     ./restic-vnstat.nix
diff --git a/machines/lollo/shairport-sync.nix b/machines/lollo/shairport-sync.nix
@@ -0,0 +1,17 @@
+{ pkgs, ... }:
+
+{
+  home-manager.users.leah = {
+    systemd.user.services.shairport-sync = {
+      Service = {
+        ExecStart = "${pkgs.shairport-sync}/bin/shairport-sync -o pa -a 'lollo' -p 5001";
+        Restart = "always";
+        RestartSec = 5;
+      };
+
+      Install = {
+        WantedBy = [ "default.target" ];
+      };
+    };
+  };
+}