mirror of
https://github.com/nix-community/disko.git
synced 2026-12-02 05:53:28 +01:00
cli: stop using system dependencies in destroy step
re-applying15aa78e9a5because I accidentally overwrote it in15aa78e9a5.
This commit is contained in:
1 parent
d7d57edb72
commit
a6a3179ddf
1 file changed
+14
-13
+14
-13
@@ -391,21 +391,22 @@ let
|
|||||||
default = { pkgs, checked ? false }:
|
default = { pkgs, checked ? false }:
|
||||||
let
|
let
|
||||||
throwIfNoDisksDetected = _: v: if devices.disk == { } then throw "No disks defined, did you forget to import your disko config?" else v;
|
throwIfNoDisksDetected = _: v: if devices.disk == { } then throw "No disks defined, did you forget to import your disko config?" else v;
|
||||||
|
destroyDependencies = with pkgs; [
|
||||||
|
util-linux
|
||||||
|
e2fsprogs
|
||||||
|
mdadm
|
||||||
|
zfs
|
||||||
|
lvm2
|
||||||
|
bash
|
||||||
|
jq
|
||||||
|
gnused
|
||||||
|
gawk
|
||||||
|
coreutils-full
|
||||||
|
];
|
||||||
in
|
in
|
||||||
lib.mapAttrs throwIfNoDisksDetected {
|
lib.mapAttrs throwIfNoDisksDetected {
|
||||||
destroyScript = (diskoLib.writeCheckedBash { inherit pkgs checked; }) "disko-destroy" ''
|
destroyScript = (diskoLib.writeCheckedBash { inherit pkgs checked; }) "disko-destroy" ''
|
||||||
export PATH=${lib.makeBinPath (with pkgs; [
|
export PATH=${lib.makeBinPath destroyDependencies}:$PATH
|
||||||
util-linux
|
|
||||||
e2fsprogs
|
|
||||||
mdadm
|
|
||||||
zfs
|
|
||||||
lvm2
|
|
||||||
bash
|
|
||||||
jq
|
|
||||||
gnused
|
|
||||||
gawk
|
|
||||||
coreutils-full
|
|
||||||
])}:$PATH
|
|
||||||
${cfg.config._destroy}
|
${cfg.config._destroy}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
@@ -420,7 +421,7 @@ let
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
diskoScript = (diskoLib.writeCheckedBash { inherit pkgs checked; }) "disko" ''
|
diskoScript = (diskoLib.writeCheckedBash { inherit pkgs checked; }) "disko" ''
|
||||||
export PATH=${lib.makeBinPath ((cfg.config._packages pkgs) ++ [ pkgs.bash ])}:$PATH
|
export PATH=${lib.makeBinPath ((cfg.config._packages pkgs) ++ [ pkgs.bash ] ++ destroyDependencies)}:$PATH
|
||||||
${cfg.config._disko}
|
${cfg.config._disko}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user