start modularising NixOS config for several hosts

First step in modularising the NixOS config, with a focus on separation of host-specific and common configs.
Common modules still need to be split up and refined, several TODOs and FIXUPs remain in code. But the config builds fine on thinknix.

Roughly based on/ inspired by https://johns.codes/blog/organizing-system-configs-with-nixos#using-nixos
This commit is contained in:
Trolli Schmittlauch 2024-01-09 23:48:38 +01:00
parent 0639633b0d
commit 993308a2d3
11 changed files with 239 additions and 159 deletions

12
hosts/thinknix/swap.nix Normal file
View file

@ -0,0 +1,12 @@
{
swapDevices = [
{ device = "/dev/disk/by-uuid/bf928178-4e92-4e7e-8df2-18fbd658eecf"; }
];
zramSwap = {
enable = true;
memoryPercent = 20;
};
boot.kernel.sysctl."vm.swappiness" = 9;
}