make storage.osDisk optional
This commit is contained in:
parent
0fe9aef9f5
commit
317ad27b2a
2 changed files with 2 additions and 9 deletions
|
@ -3,12 +3,5 @@
|
|||
kind = "physical";
|
||||
arch = "aarch64-linux";
|
||||
isRaspberryPi = true;
|
||||
|
||||
nixosModule.lab = {
|
||||
# TODO: can we do this differently?
|
||||
storage = {
|
||||
osDisk = "/dev/sda";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ let cfg = config.lab.storage;
|
|||
in {
|
||||
options.lab.storage = {
|
||||
osDisk = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
type = with lib.types; nullOr str;
|
||||
description = ''
|
||||
The disk to be used for the machine's operating system.
|
||||
'';
|
||||
|
@ -40,8 +40,8 @@ in {
|
|||
})
|
||||
];
|
||||
|
||||
# TODO: Rename this to 'osDisk'. Unfortunately, we would need to run nixos-anywhere again then.
|
||||
disko = lib.mkIf machine.isHypervisor {
|
||||
# TODO: Rename this to 'osDisk'. Unfortunately, we would need to run nixos-anywhere again then.
|
||||
devices.disk.vdb = {
|
||||
device = cfg.osDisk;
|
||||
type = "disk";
|
||||
|
|
Loading…
Reference in a new issue