mirror of
https://github.com/nix-community/disko
synced 2024-11-12 23:27:07 +00:00
scripts: append old $PATH for destroying
This commit is contained in:
parent
1ecb428c86
commit
192f9cc416
2 changed files with 6 additions and 6 deletions
|
@ -17,7 +17,7 @@ in {
|
||||||
create = cfg: types.diskoLib.create (eval cfg).config.devices;
|
create = cfg: types.diskoLib.create (eval cfg).config.devices;
|
||||||
createScript = cfg: pkgs: pkgs.writeScript "disko-create" ''
|
createScript = cfg: pkgs: pkgs.writeScript "disko-create" ''
|
||||||
#!/usr/bin/env bash
|
#!/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}
|
${types.diskoLib.create (eval cfg).config.devices}
|
||||||
'';
|
'';
|
||||||
createScriptNoDeps = cfg: pkgs: pkgs.writeScript "disko-create" ''
|
createScriptNoDeps = cfg: pkgs: pkgs.writeScript "disko-create" ''
|
||||||
|
@ -27,7 +27,7 @@ in {
|
||||||
mount = cfg: types.diskoLib.mount (eval cfg).config.devices;
|
mount = cfg: types.diskoLib.mount (eval cfg).config.devices;
|
||||||
mountScript = cfg: pkgs: pkgs.writeScript "disko-mount" ''
|
mountScript = cfg: pkgs: pkgs.writeScript "disko-mount" ''
|
||||||
#!/usr/bin/env bash
|
#!/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}
|
${types.diskoLib.mount (eval cfg).config.devices}
|
||||||
'';
|
'';
|
||||||
mountScriptNoDeps = cfg: pkgs: pkgs.writeScript "disko-mount" ''
|
mountScriptNoDeps = cfg: pkgs: pkgs.writeScript "disko-mount" ''
|
||||||
|
@ -37,7 +37,7 @@ in {
|
||||||
zapCreateMount = cfg: types.diskoLib.zapCreateMount (eval cfg).config.devices;
|
zapCreateMount = cfg: types.diskoLib.zapCreateMount (eval cfg).config.devices;
|
||||||
zapCreateMountScript = cfg: pkgs: pkgs.writeScript "disko-zap-create-mount" ''
|
zapCreateMountScript = cfg: pkgs: pkgs.writeScript "disko-zap-create-mount" ''
|
||||||
#!/usr/bin/env bash
|
#!/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}
|
${types.diskoLib.zapCreateMount (eval cfg).config.devices}
|
||||||
'';
|
'';
|
||||||
zapCreateMountScriptNoDeps = cfg: pkgs: pkgs.writeScript "disko-zap-create-mount" ''
|
zapCreateMountScriptNoDeps = cfg: pkgs: pkgs.writeScript "disko-zap-create-mount" ''
|
||||||
|
|
|
@ -19,17 +19,17 @@ in {
|
||||||
};
|
};
|
||||||
config = {
|
config = {
|
||||||
system.build.formatScript = pkgs.writers.writeDash "disko-create" ''
|
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}
|
${types.diskoLib.create cfg.devices}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
system.build.mountScript = pkgs.writers.writeDash "disko-mount" ''
|
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}
|
${types.diskoLib.mount cfg.devices}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
system.build.disko = pkgs.writers.writeBash "disko" ''
|
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}
|
${types.diskoLib.zapCreateMount cfg.devices}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue