ctucx.git: nixfiles

ctucx' nixfiles

commit 5f245573bc4d92f61a489286001ec0d534e9e41e
parent bbad527fa5f617378fb782aef3a9faf886508722
Author: Leah (ctucx) <leah@ctu.cx>
Date: Wed, 12 Jan 2022 17:05:08 +0100

programs/easyeffects: add program
2 files changed, 32 insertions(+), 0 deletions(-)
diff --git a/configurations/desktop-sway.nix b/configurations/desktop-sway.nix
@@ -41,6 +41,7 @@
     ./programs/cli/password-store.nix
 
     ./programs/pipewire.nix
+    ./programs/easyeffects.nix
     ./programs/physlock.nix
     ./programs/usbmuxd.nix
 
diff --git a/configurations/programs/easyeffects.nix b/configurations/programs/easyeffects.nix
@@ -0,0 +1,31 @@
+{ pkgs, ... }:
+
+{
+  home-manager.users.leah = {
+    home.packages = with pkgs; [
+      easyeffects
+    ];
+
+    systemd.user.services.easyeffects = {
+      Unit = {
+        After  = [ "graphical-session-pre.target" ];
+        PartOf = [ "graphical-session.target" ];
+      };
+
+      Service = {
+        Environment = "PATH=/run/wrappers/bin:/home/leah/.nix-profile/bin:/etc/profiles/per-user/leah/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin";
+        ExecStart = "${pkgs.easyeffects}/bin/easyeffects --gapplication-service";
+        Restart = "always";
+        RestartSec = 5;
+      };
+
+      Install = {
+        WantedBy = [ "graphical-session.target" ];
+      };
+    };
+
+    wayland.windowManager.sway.extraConfig = ''
+      exec_always 'systemctl --user restart easyeffects'
+    '';
+  };
+}