Migrated to NixOS (Oh Happy day!!)

This commit is contained in:
2026-04-14 14:46:35 +02:00
parent b3ac11ef38
commit 77ba1cab5f
11 changed files with 196 additions and 129 deletions

View File

@@ -2,6 +2,7 @@
config,
lib,
modulesPath,
primaryUser,
...
}:
@@ -21,13 +22,14 @@
kernelModules = [ "kvm-intel" ];
extraModulePackages = [ ];
};
fileSystems = {
"/" = {
"/" = lib.mkForce {
device = "/dev/disk/by-label/NIXROOT";
fsType = "ext4";
};
"/boot" = {
"/boot" = lib.mkForce {
device = "/dev/disk/by-label/NIXBOOT";
fsType = "vfat";
options = [
@@ -37,8 +39,47 @@
};
# TODO: Add External Devices as by-label with no necessity for boot
"/storage/internal" = {
device = "/dev/disk/by-label/STORAGE";
fsType = "btrfs";
options = [
"compress=zstd"
"noatime"
"nofail"
];
};
"/storage/fast" = {
device = "/dev/disk/by-label/FAST";
fsType = "ext4";
options = [
"nofail"
"noatime"
"x-systemd.automount"
"x-systemd.idle-timeout=60"
];
};
"/storage/backup" = {
device = "/dev/disk/by-label/BACKUP";
fsType = "ext4";
options = [
"nofail"
"noatime"
"x-systemd.automount"
"x-systemd.idle-timeout=60"
];
};
};
systemd.tmpfiles.rules = [
"d /storage 0755 ${primaryUser} users -"
"d /storage/internal 0755 ${primaryUser} users -"
"d /storage/fast 0755 ${primaryUser} users -"
"d /storage/backup 0755 ${primaryUser} users -"
];
swapDevices = [
{
device = "/swapfile";