mirror of
https://github.com/nix-community/disko.git
synced 2024-09-11 06:25:33 +03:00
module: put disko scripts in system.build for better reference
This commit is contained in:
parent
9cf4f170ae
commit
7a4c85b53e
15
module.nix
15
module.nix
@ -36,6 +36,21 @@ in {
|
||||
'')
|
||||
]) ++ lib.optionals cfg.enableConfig (types.diskoLib.packages cfg.devices pkgs);
|
||||
|
||||
system.build.formatScript = pkgs.writers.writeDash "disko-create" ''
|
||||
export PATH=${lib.makeBinPath (types.diskoLib.packages cfg.devices pkgs)}
|
||||
${types.diskoLib.create cfg.devices}
|
||||
'';
|
||||
|
||||
system.build.mountScript = pkgs.writers.writeDash "disko-mount" ''
|
||||
export PATH=${lib.makeBinPath (types.diskoLib.packages cfg.devices pkgs)}
|
||||
${types.diskoLib.mount cfg.devices}
|
||||
'';
|
||||
|
||||
system.build.disko = pkgs.writers.writeDash "disko" ''
|
||||
export PATH=${lib.makeBinPath (types.diskoLib.packages cfg.devices pkgs)}
|
||||
${types.diskoLib.zapCreateMount cfg.devices}
|
||||
'';
|
||||
|
||||
# Remember to add config keys here if they are added to types
|
||||
fileSystems = lib.mkIf cfg.enableConfig (lib.mkMerge (lib.catAttrs "fileSystems" (types.diskoLib.config cfg.devices)));
|
||||
boot = lib.mkIf cfg.enableConfig (lib.mkMerge (lib.catAttrs "boot" (types.diskoLib.config cfg.devices)));
|
||||
|
Loading…
Reference in New Issue
Block a user