experimental: harbor disko schema
This commit is contained in:
71
hosts/harbor/disko.nix
Normal file
71
hosts/harbor/disko.nix
Normal file
@@ -0,0 +1,71 @@
|
||||
let
|
||||
btrfsopt = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
"ssd"
|
||||
"space_cache=v2"
|
||||
"user_subvol_rm_allowed"
|
||||
];
|
||||
in {
|
||||
disko.devices = {
|
||||
disk = {
|
||||
main = {
|
||||
type = "disk";
|
||||
device = "/dev/sda";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
boot = {
|
||||
name = "boot";
|
||||
size = "1M";
|
||||
type = "ef02";
|
||||
};
|
||||
esp = {
|
||||
name = "esp";
|
||||
size = "500M";
|
||||
type = "ef00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
};
|
||||
};
|
||||
luks = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "nixos";
|
||||
passwordFile = "/tmp/pass";
|
||||
additionalKeyFiles = ["/nixos-enc.key"];
|
||||
extraFormatArgs = [
|
||||
"--type luks1"
|
||||
"--iter-time 3000"
|
||||
];
|
||||
settings = {
|
||||
allowDiscards = true;
|
||||
};
|
||||
content = {
|
||||
type = "btrfs";
|
||||
subvolumes = {
|
||||
"@root" = {
|
||||
mountpoint = "/";
|
||||
mountOptions = btrfsopt;
|
||||
};
|
||||
"@home" = {
|
||||
mountpoint = "/home";
|
||||
mountOptions = btrfsopt;
|
||||
};
|
||||
"@nix" = {
|
||||
mountpoint = "/nix";
|
||||
mountOptions = btrfsopt;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user