From 06130516d151b2f4b818a874d8d3be6d5079de4b Mon Sep 17 00:00:00 2001 From: Alistair Potts Date: Sat, 3 Feb 2018 09:22:53 +0000 Subject: [PATCH] stalonetray: add module Fixing the rather embarrasing oversight in the orignial PR regarding direct mentioning of the stalonetray package in several different places at once. Also improve quoting in .stalonetrayrc to prevent rather awkward quotation of attribute set. --- modules/services/stalonetray.nix | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/modules/services/stalonetray.nix b/modules/services/stalonetray.nix index 33ca1b16..a21c7ce5 100644 --- a/modules/services/stalonetray.nix +++ b/modules/services/stalonetray.nix @@ -6,8 +6,6 @@ let cfg = config.services.stalonetray; - package = pkgs.stalonetray; - in { @@ -35,7 +33,7 @@ in decorations = null; icon_size = 30; sticky = true; - background = ''"#cccccc"''; + background = "#cccccc"; }; }; @@ -56,7 +54,7 @@ in config = mkIf cfg.enable (mkMerge [ { - home.packages = [ pkgs.stalonetray ]; + home.packages = [ cfg.package ]; systemd.user.services.stalonetray = { Unit = { @@ -70,7 +68,7 @@ in }; Service = { - ExecStart = "${package}/bin/stalonetray"; + ExecStart = "${cfg.package}/bin/stalonetray"; Restart = "on-failure"; }; }; @@ -82,7 +80,7 @@ in valueToString = v: if isBool v then (if v then "true" else "false") else if (v==null) then "none" - else toString v; + else ''"${toString v}"''; in concatStrings ( mapAttrsToList (k: v: "${k} ${valueToString v}\n") cfg.config