{lib, ...}: with lib; { nixfiles.modules = { wireguard.client.enable = true; syncthing.enable = true; acme.enable = true; rtorrent.enable = true; ipfs.enable = true; }; # The /nix/var/nix/db/db.sqlite file is currently corrupt. This is technically # fixable with a reinstall, but this system doesn't have a recovery mode # access and I'm too lazy to redo everything with nixos-infect at this point. # # These services fail because of that. Although, updating configuration works # just fine. nix = { gc.automatic = mkForce false; optimise.automatic = mkForce false; }; boot = { loader.grub = { enable = true; device = "/dev/sda"; }; # NOTE This is probably not required, but I cannot test this out without # risking "bricking" my VPS because Kimsufi/OVH doesn't provide a console # access. This configuration was generated via nixos-infect[1] and at the # time I didn't bother to test for loaded kernel modules and just left the # automatically (IIRC) generated `hardware-configuration.nix' as is. # # There's, however, no indication that any NVME drives are being used and, # as the matter of fact, the VPS itself is on KVM, so... I'm still not going # to risk it, though. # # [1]: https://github.com/elitak/nixos-infect initrd.availableKernelModules = ["nvme"]; }; fileSystems."/" = { device = "/dev/sda1"; fsType = "ext4"; options = ["noatime"]; }; swapDevices = [ { device = "/swapfile"; size = 4 * 1024; } ]; zramSwap = { enable = true; memoryPercent = 25; }; }