mirror of
https://github.com/nix-community/disko.git
synced 2024-09-11 06:25:33 +03:00
fix: module: define only if devices are given
This commit is contained in:
parent
1006ff074c
commit
df3a607ad7
@ -5,8 +5,8 @@ let
|
||||
in {
|
||||
options.disko = {
|
||||
devices = lib.mkOption {
|
||||
type = lib.types.nullOr types.devices;
|
||||
default = null;
|
||||
type = types.devices;
|
||||
default = {};
|
||||
};
|
||||
enableConfig = lib.mkOption {
|
||||
description = ''
|
||||
@ -18,7 +18,7 @@ in {
|
||||
default = true;
|
||||
};
|
||||
};
|
||||
config = lib.mkIf (cfg.devices != null) {
|
||||
config = lib.mkIf (cfg.devices.disk != {}) {
|
||||
system.build.formatScript = pkgs.writers.writeDash "disko-create" ''
|
||||
export PATH=${lib.makeBinPath (types.diskoLib.packages cfg.devices pkgs)}:$PATH
|
||||
${types.diskoLib.create cfg.devices}
|
||||
|
Loading…
Reference in New Issue
Block a user