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";
|
kind = "physical";
|
||||||
arch = "aarch64-linux";
|
arch = "aarch64-linux";
|
||||||
isRaspberryPi = true;
|
isRaspberryPi = true;
|
||||||
|
|
||||||
nixosModule.lab = {
|
|
||||||
# TODO: can we do this differently?
|
|
||||||
storage = {
|
|
||||||
osDisk = "/dev/sda";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@ let cfg = config.lab.storage;
|
||||||
in {
|
in {
|
||||||
options.lab.storage = {
|
options.lab.storage = {
|
||||||
osDisk = lib.mkOption {
|
osDisk = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = with lib.types; nullOr str;
|
||||||
description = ''
|
description = ''
|
||||||
The disk to be used for the machine's operating system.
|
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 {
|
disko = lib.mkIf machine.isHypervisor {
|
||||||
|
# TODO: Rename this to 'osDisk'. Unfortunately, we would need to run nixos-anywhere again then.
|
||||||
devices.disk.vdb = {
|
devices.disk.vdb = {
|
||||||
device = cfg.osDisk;
|
device = cfg.osDisk;
|
||||||
type = "disk";
|
type = "disk";
|
||||||
|
|
Loading…
Reference in a new issue