about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--modules/shell/git/default.nix18
-rw-r--r--modules/workstation/mail/msmtp/default.nix7
-rw-r--r--modules/workstation/windowing/sway/config.in4
-rw-r--r--modules/workstation/windowing/sway/default.nix28
4 files changed, 28 insertions, 29 deletions
diff --git a/modules/shell/git/default.nix b/modules/shell/git/default.nix
index 2f61a984aff3..8a7c10bfdb47 100644
--- a/modules/shell/git/default.nix
+++ b/modules/shell/git/default.nix
@@ -1,13 +1,13 @@
 { pkgs, ... }:
 
 let
-  mozlz4_textconv = pkgs.runCommand "mozlz4-textconv" {
+  mozlz4_textconv = pkgs.substituteAll {
+    src = diff/mozlz4.in;
+    isExecutable = true;
+
     inherit (pkgs) execline mozlz4a;
     python = pkgs.python3;
-  } ''
-    substituteAll ${diff/mozlz4.in} $out
-    chmod +x $out
-  '';
+  };
 
   # Git only supports absolute paths for this, so give it a wrapper
   # program that execs the msmtp in PATH.
@@ -16,16 +16,16 @@ let
     msmtp $@
   '';
 
-  config = pkgs.runCommand "gitconfig" {
+  config = pkgs.substituteAll {
+    src = ./config.in;
+
     inherit mozlz4_textconv;
     python = pkgs.python3;
     smtpServer = sendmail;
     attributesfile = ./attributes;
     ignorefile = ./ignore;
     preferLocalBuild = true;
-  } ''
-    substituteAll ${./config.in} $out
-  '';
+  };
 
 in
 {
diff --git a/modules/workstation/mail/msmtp/default.nix b/modules/workstation/mail/msmtp/default.nix
index 1648020c0633..34e23b1d1eb0 100644
--- a/modules/workstation/mail/msmtp/default.nix
+++ b/modules/workstation/mail/msmtp/default.nix
@@ -5,10 +5,9 @@
 
   home.qyliss.dirs."state/msmtp" = {};
 
-  xdg.config.users.qyliss.paths."msmtp/config" = pkgs.runCommand "msmtprc" {
+  xdg.config.users.qyliss.paths."msmtp/config" = pkgs.substituteAll {
+    src = ./msmtprc.in;
     inherit (pkgs) gnupg;
     tls_trust_file = "/etc/ssl/certs/ca-bundle.crt";
-  } ''
-    substituteAll ${./msmtprc.in} $out
-  '';
+  };
 }
diff --git a/modules/workstation/windowing/sway/config.in b/modules/workstation/windowing/sway/config.in
index 7b4e44f5c350..4134f65c5b12 100644
--- a/modules/workstation/windowing/sway/config.in
+++ b/modules/workstation/windowing/sway/config.in
@@ -46,8 +46,8 @@ bindsym $mod+Shift+$down move down
 bindsym $mod+Shift+$up move up
 bindsym $mod+Shift+$right move right
 
-bindsym $mod+g exec swaymsg workspace "$(@choose_workspace@)"
-bindsym $mod+Shift+g exec swaymsg move container to workspace "$(@choose_workspace@)"
+bindsym $mod+g exec swaymsg workspace "$(@choose_workspace@ | sed 's/\$/$$/g')"
+bindsym $mod+Shift+g exec swaymsg move container to workspace "$(@choose_workspace@ | sed 's/\$/$$/g')"
 
 bindsym $mod+b splith
 bindsym $mod+v splitv
diff --git a/modules/workstation/windowing/sway/default.nix b/modules/workstation/windowing/sway/default.nix
index 4959b5164f01..f5c304e5d803 100644
--- a/modules/workstation/windowing/sway/default.nix
+++ b/modules/workstation/windowing/sway/default.nix
@@ -1,23 +1,23 @@
 { pkgs, ... }:
 
 let
-  config = pkgs.runCommand "sway-config" {
+  config = pkgs.substituteAll {
+    src = ./config.in;
     inherit status_command choose_workspace;
-  } ''
-    substituteAll ${./config.in} $out
-  '';
+  };
 
-  status_command = with pkgs;
-    runCommand "status_command" { inherit execline; } ''
-      substituteAll ${./status_command.in} $out
-      chmod +x $out
-    '';
+  status_command = pkgs.substituteAll {
+    src = ./status_command.in;
+    isExecutable = true;
+    inherit (pkgs) execline;
+  };
+
+  choose_workspace = pkgs.substituteAll {
+    src = ./choose_workspace.in;
+    isExecutable = true;
+    inherit (pkgs) execline jq;
+  };
 
-  choose_workspace = with pkgs;
-    runCommand "choose_workspace" { inherit execline jq; } ''
-      substituteAll ${./choose_workspace.in} $out
-      chmod +x $out
-    '';
 in
 
 {