Added Disko setup; And test impermanence on node 1 & 2

This commit is contained in:
2026-06-27 21:43:29 +02:00
parent e2e63fbcab
commit 57f6b25a9e
10 changed files with 254 additions and 164 deletions
+1
View File
@@ -1,5 +1,6 @@
{
imports = [
./disko.nix
./hardware-configuration.nix
];
+68
View File
@@ -0,0 +1,68 @@
{
disko.devices.disk.main = {
type = "disk";
device = "/dev/sda";
content = {
type = "gpt";
partitions = {
ESP = {
size = "512M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [
"fmask=0022"
"dmask=0022"
];
extraArgs = [
"-n"
"NIXBOOT"
];
};
};
swap = {
size = "4G";
content = {
type = "swap";
extraArgs = [
"-L"
"NIXSWAP"
];
};
};
nix = {
size = "50G";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/nix";
mountOptions = [ "defaults" ];
extraArgs = [
"-L"
"NIXSTORE"
];
};
};
persist = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/persist";
extraArgs = [
"-L"
"NIXPERSIST"
];
};
};
};
};
};
}
+3 -25
View File
@@ -31,32 +31,10 @@
"mode=755"
];
};
"/boot" = {
device = "/dev/disk/by-label/NIXBOOT";
fsType = "vfat";
options = [
"fmask=0022"
"dmask=0022"
];
};
"/nix" = {
device = "/dev/disk/by-label/NIXSTORE";
fsType = "ext4";
neededForBoot = true;
};
"/persist" = {
device = "/dev/disk/by-label/NIXPERSIST";
fsType = "ext4";
neededForBoot = true;
};
};
swapDevices = [
{
device = "/persist/swapfile";
size = 4096;
}
];
"/nix".neededForBoot = true;
"/persist".neededForBoot = true;
};
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}