WIP: Added Hardware configurations for node servers as a test

This commit is contained in:
2026-06-24 19:27:57 +02:00
parent a3139051b1
commit 1751f4bc5b
3 changed files with 41 additions and 16 deletions
+3
View File
@@ -5,6 +5,9 @@
directories = [ directories = [
".config/nix" ".config/nix"
".local/share/zoxide" ".local/share/zoxide"
"Documents"
"Downloads"
"Pictures"
]; ];
files = [ files = [
".local/share/fish/fish_history" ".local/share/fish/fish_history"
+19 -8
View File
@@ -4,7 +4,6 @@
modulesPath, modulesPath,
... ...
}: }:
{ {
imports = [ imports = [
(modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
@@ -21,12 +20,17 @@
kernelModules = [ "kvm-intel" ]; kernelModules = [ "kvm-intel" ];
extraModulePackages = [ ]; extraModulePackages = [ ];
}; };
fileSystems = { fileSystems = {
"/" = { "/" = {
device = "/dev/disk/by-label/NIXROOT"; device = "none";
fsType = "ext4"; fsType = "tmpfs";
options = [
"defaults"
"size=2G"
"mode=755"
];
}; };
"/boot" = { "/boot" = {
device = "/dev/disk/by-label/NIXBOOT"; device = "/dev/disk/by-label/NIXBOOT";
fsType = "vfat"; fsType = "vfat";
@@ -35,17 +39,24 @@
"dmask=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 = [ swapDevices = [
{ {
device = "/swapfile"; device = "/persist/swapfile";
size = 4096; size = 4096;
} }
]; ];
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
} }
+19 -8
View File
@@ -4,7 +4,6 @@
modulesPath, modulesPath,
... ...
}: }:
{ {
imports = [ imports = [
(modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
@@ -21,12 +20,17 @@
kernelModules = [ "kvm-intel" ]; kernelModules = [ "kvm-intel" ];
extraModulePackages = [ ]; extraModulePackages = [ ];
}; };
fileSystems = { fileSystems = {
"/" = { "/" = {
device = "/dev/disk/by-label/NIXROOT"; device = "none";
fsType = "ext4"; fsType = "tmpfs";
options = [
"defaults"
"size=2G"
"mode=755"
];
}; };
"/boot" = { "/boot" = {
device = "/dev/disk/by-label/NIXBOOT"; device = "/dev/disk/by-label/NIXBOOT";
fsType = "vfat"; fsType = "vfat";
@@ -35,17 +39,24 @@
"dmask=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 = [ swapDevices = [
{ {
device = "/swapfile"; device = "/persist/swapfile";
size = 4096; size = 4096;
} }
]; ];
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
} }