summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2022-12-10 01:03:17 +0100
committerlassulus <lassulus@lassul.us>2022-12-24 12:13:04 +0100
commit192f9cc4162ab1cacbd12664cd968c5d358c1f7e (patch)
treeef855090309ffd00c65c0d48f39387274dfd9ae0
parent1ecb428c86b7b0e70493295a73f62b240ab0bb29 (diff)
scripts: append old $PATH for destroying
-rw-r--r--default.nix6
-rw-r--r--module.nix6
2 files changed, 6 insertions, 6 deletions
diff --git a/default.nix b/default.nix
index bc975a7..ada33e4 100644
--- a/default.nix
+++ b/default.nix
@@ -17,7 +17,7 @@ in {
create = cfg: types.diskoLib.create (eval cfg).config.devices;
createScript = cfg: pkgs: pkgs.writeScript "disko-create" ''
#!/usr/bin/env bash
- export PATH=${lib.makeBinPath (types.diskoLib.packages (eval cfg).config.devices pkgs)}
+ export PATH=${lib.makeBinPath (types.diskoLib.packages (eval cfg).config.devices pkgs)}:$PATH
${types.diskoLib.create (eval cfg).config.devices}
'';
createScriptNoDeps = cfg: pkgs: pkgs.writeScript "disko-create" ''
@@ -27,7 +27,7 @@ in {
mount = cfg: types.diskoLib.mount (eval cfg).config.devices;
mountScript = cfg: pkgs: pkgs.writeScript "disko-mount" ''
#!/usr/bin/env bash
- export PATH=${lib.makeBinPath (types.diskoLib.packages (eval cfg).config.devices pkgs)}
+ export PATH=${lib.makeBinPath (types.diskoLib.packages (eval cfg).config.devices pkgs)}:$PATH
${types.diskoLib.mount (eval cfg).config.devices}
'';
mountScriptNoDeps = cfg: pkgs: pkgs.writeScript "disko-mount" ''
@@ -37,7 +37,7 @@ in {
zapCreateMount = cfg: types.diskoLib.zapCreateMount (eval cfg).config.devices;
zapCreateMountScript = cfg: pkgs: pkgs.writeScript "disko-zap-create-mount" ''
#!/usr/bin/env bash
- export PATH=${lib.makeBinPath (types.diskoLib.packages (eval cfg).config.devices pkgs)}
+ export PATH=${lib.makeBinPath (types.diskoLib.packages (eval cfg).config.devices pkgs)}:$PATH
${types.diskoLib.zapCreateMount (eval cfg).config.devices}
'';
zapCreateMountScriptNoDeps = cfg: pkgs: pkgs.writeScript "disko-zap-create-mount" ''
diff --git a/module.nix b/module.nix
index 1a8a000..40b7490 100644
--- a/module.nix
+++ b/module.nix
@@ -19,17 +19,17 @@ in {
};
config = {
system.build.formatScript = pkgs.writers.writeDash "disko-create" ''
- export PATH=${lib.makeBinPath (types.diskoLib.packages cfg.devices pkgs)}
+ export PATH=${lib.makeBinPath (types.diskoLib.packages cfg.devices pkgs)}:$PATH
${types.diskoLib.create cfg.devices}
'';
system.build.mountScript = pkgs.writers.writeDash "disko-mount" ''
- export PATH=${lib.makeBinPath (types.diskoLib.packages cfg.devices pkgs)}
+ export PATH=${lib.makeBinPath (types.diskoLib.packages cfg.devices pkgs)}:$PATH
${types.diskoLib.mount cfg.devices}
'';
system.build.disko = pkgs.writers.writeBash "disko" ''
- export PATH=${lib.makeBinPath (types.diskoLib.packages cfg.devices pkgs)}
+ export PATH=${lib.makeBinPath (types.diskoLib.packages cfg.devices pkgs)}:$PATH
${types.diskoLib.zapCreateMount cfg.devices}
'';