about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--modules/trayscale.nix22
1 files changed, 22 insertions, 0 deletions
diff --git a/modules/trayscale.nix b/modules/trayscale.nix
new file mode 100644
index 0000000..2aa1e74
--- /dev/null
+++ b/modules/trayscale.nix
@@ -0,0 +1,22 @@
+{ config, lib, pkgs, ... }:
+
+# TODO: send to upstream
+{
+  meta = {
+    maintainers = lib.maintainers.sefidel;
+  };
+
+  options.programs.trayscale = {
+    enable = lib.mkEnableOption (lib.mdDoc "trayscale");
+  };
+
+  config = lib.mkIf config.programs.trayscale.enable {
+    systemd.user.services.trayscale = {
+      description = "Network manager applet";
+      wantedBy = [ "graphical-session.target" ];
+      partOf = [ "graphical-session.target" ];
+      serviceConfig.ExecStart = "${pkgs.trayscale}/bin/trayscale";
+    };
+  };
+}
+