disko: use disko for config.fileSystems

because nixos-generate-config does not handle our complex setup :(
This commit is contained in:
Sandro - 2023-05-20 04:37:42 +02:00
parent 23a1aecaf5
commit 815a379ddb
Signed by: sandro
GPG Key ID: 3AF5A43A3EECC2E5
1 changed files with 118 additions and 121 deletions

View File

@ -64,8 +64,7 @@ in
])
cfg.disks));
disko = {
devices = lib.mkIf (cfg.disks != [ ]) (lib.head (map
disko.devices = lib.mkIf (cfg.disks != [ ]) (lib.head (map
(disk:
let
diskName = if disk.name != "" then "-${disk.name}" else "";
@ -123,14 +122,15 @@ in
} // lib.optionalAttrs disk.withLuks {
lvm_vg.${vgName} = {
type = "lvm_vg";
lvs = lib.optionalAttrs disk.withCeph {
lvs = lib.optionalAttrs disk.withCeph
{
ceph.size = "100%FREE";
} // lib.optionalAttrs disk.withZfs { inherit zfs; };
};
} // {
zpool.${zfsName} = {
type = "zpool";
mountpoint = null;
mountpoint = "/";
rootFsOptions.acltype = "posixacl";
options = {
ashift = "12";
@ -189,8 +189,5 @@ in
};
})
cfg.disks));
# we use our own hardware-configuration.nix
enableConfig = false;
};
};
}