Added Impermanence to services runned by cyper-controller

This commit is contained in:
2026-06-28 15:02:42 +02:00
parent bbf95a5a8c
commit a292eb6b09
15 changed files with 205 additions and 25 deletions
+2 -1
View File
@@ -1,5 +1,6 @@
{
imports = [
./disko.nix
./hardware-configuration.nix
./smb.nix
../../nixos/roles/monitoring.nix
@@ -11,7 +12,6 @@
../../nixos/roles/gitea.nix
../../nixos/roles/vaultwarden.nix
../../nixos/roles/frontpage
#../../nixos/roles/paperless-ngx.nix
../../nixos/roles/octoprint.nix
../../nixos/roles/matrix/postgres-backup.nix
../../nixos/roles/kanidm.nix
@@ -45,5 +45,6 @@
};
efi.canTouchEfiVariables = true;
};
system.stateVersion = "26.05";
}
+62
View File
@@ -0,0 +1,62 @@
{
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 = "8G";
content = {
type = "swap";
extraArgs = [
"-L"
"NIXSWAP"
];
};
};
nix = {
size = "80G";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/nix";
extraArgs = [
"-L"
"NIXSTORE"
];
};
};
persist = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/persist";
extraArgs = [
"-L"
"NIXPERSIST"
];
};
};
};
};
};
}
@@ -5,7 +5,6 @@
primaryUser,
...
}:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
@@ -17,6 +16,7 @@
"ahci"
"usb_storage"
"sd_mod"
"nvme"
];
initrd.kernelModules = [ ];
kernelModules = [ "kvm-intel" ];
@@ -24,17 +24,13 @@
};
fileSystems = {
"/" = lib.mkForce {
device = "/dev/disk/by-label/NIXROOT";
fsType = "ext4";
};
"/boot" = lib.mkForce {
device = "/dev/disk/by-label/NIXBOOT";
fsType = "vfat";
"/" = {
device = "none";
fsType = "tmpfs";
options = [
"fmask=0022"
"dmask=0022"
"defaults"
"size=2G"
"mode=755"
];
};
@@ -70,6 +66,8 @@
];
};
"/nix".neededForBoot = true;
"/persist".neededForBoot = true;
};
systemd.tmpfiles.rules = [
@@ -79,15 +77,7 @@
"d /storage/backup 0755 ${primaryUser} users -"
];
swapDevices = [
{
device = "/swapfile";
size = 4096;
}
];
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}