mirror of
https://github.com/nix-community/disko.git
synced 2026-11-30 13:03:28 +01:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d4c64aee75 |
+13
-8
@@ -98,16 +98,21 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
config = lib.mkIf (cfg.devices.disk != { }) {
|
config = {
|
||||||
system.build = (cfg.devices._scripts { inherit pkgs; checked = cfg.checkScripts; }) // {
|
system.build = lib.mapAttrs (name: cfg:
|
||||||
|
if cfg.devices.disk == {} then
|
||||||
# we keep these old outputs for compatibility
|
throw ''
|
||||||
disko = builtins.trace "the .disko output is deprecated, please use .diskoScript instead" (cfg.devices._scripts { inherit pkgs; }).diskoScript;
|
Cannot provide ${name} without disks configured.
|
||||||
diskoNoDeps = builtins.trace "the .diskoNoDeps output is deprecated, please use .diskoScriptNoDeps instead" (cfg.devices._scripts { inherit pkgs; }).diskoScriptNoDeps;
|
Current value of disko.devices.disk is empty.
|
||||||
|
Set up a disk configuration according to:
|
||||||
|
https://github.com/nix-community/disko/blob/master/docs/quickstart.md#step-1-choose-a-disk-configuration
|
||||||
|
''
|
||||||
|
else cfg)
|
||||||
|
(cfg.devices._scripts { inherit pkgs; checked = cfg.checkScripts; } // {
|
||||||
diskoImages = diskoLib.makeDiskImages {
|
diskoImages = diskoLib.makeDiskImages {
|
||||||
nixosConfig = args;
|
nixosConfig = args;
|
||||||
};
|
};
|
||||||
|
|
||||||
diskoImagesScript = diskoLib.makeDiskImagesScript {
|
diskoImagesScript = diskoLib.makeDiskImagesScript {
|
||||||
nixosConfig = args;
|
nixosConfig = args;
|
||||||
};
|
};
|
||||||
@@ -121,7 +126,7 @@ in
|
|||||||
extraSystemConfig = cfg.tests.extraConfig;
|
extraSystemConfig = cfg.tests.extraConfig;
|
||||||
extraTestScript = cfg.tests.extraChecks;
|
extraTestScript = cfg.tests.extraChecks;
|
||||||
};
|
};
|
||||||
};
|
});
|
||||||
|
|
||||||
|
|
||||||
# we need to specify the keys here, so we don't get an infinite recursion error
|
# we need to specify the keys here, so we don't get an infinite recursion error
|
||||||
|
|||||||
Reference in new issue
Block a user