all repos — nixfiles @ afb912babbb2d444c29247d0f936123f600c8cc9

System and user configuration, managed by nix and home-manager

sxhkd: realise nix package paths explicitly
Alan Pearce alan@alanpearce.eu
Sat, 05 Nov 2022 05:23:59 +0100
commit

afb912babbb2d444c29247d0f936123f600c8cc9

parent

eb3cf46f60b4d86d320dfa6d250053a26536b826

2 files changed, 15 insertions(+), 10 deletions(-)

jump to
M user/settings/music.nixuser/settings/music.nix
@@ -4,7 +4,6 @@ pkgs,   ...
 }: {
   home.packages = with pkgs; [
-    playerctl
     sonixd
     (tauon.override {withDiscordRPC = true;})
   ];
M user/settings/sxhkd.nixuser/settings/sxhkd.nix
@@ -2,30 +2,36 @@ {   config,
   pkgs,
   ...
-}: {
+}: let
+  pamixer = "${pkgs.pamixer}/bin/pamixer";
+  disper = "${pkgs.disper}/bin/disper";
+  light = "${pkgs.light}/bin/light";
+  playerctl = "${pkgs.playerctl}/bin/playerctl";
+  networkmanager_dmenu = "${pkgs.networkmanager_dmenu}/bin/networkmanager_dmenu";
+in {
   xdg.configFile."sxhkd/sxhkdrc".text = ''
     XF86AudioMute
-      pamixer --toggle-mute
+      ${pamixer} --toggle-mute
 
     XF86Audio{Lower,Raise}Volume
-      pamixer --{decrease,increase} 1
+      ${pamixer} --{decrease,increase} 1
 
     @XF86AudioMicMute
-      pamixer --source 2 --toggle-mute
+      ${pamixer} --source 2 --toggle-mute
 
     XF86MonBrightness{Down,Up}
-      light -{U,A} 2%
+      ${light} -{U,A} 2%
 
     XF86Display
-      disper -C
+      ${disper} -C
 
     XF86AudioPlay
-      playerctl play-pause
+      ${playerctl} play-pause
 
     XF86Audio{Prev,Next}
-      playerctl {previous,next}
+      ${playerctl} {previous,next}
 
     XF86Tools
-      networkmanager_dmenu
+      ${networkmanager_dmenu}
   '';
 }