mirror of
https://github.com/nix-community/disko
synced 2024-11-10 06:14:14 +00:00
module: put disko scripts in system.build for better reference
This commit is contained in:
parent
9cf4f170ae
commit
7a4c85b53e
1 changed files with 15 additions and 0 deletions
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 a new issue