blob: 84d44933aa5465ce4802201befba3563dedcdd25 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
{lib, ...}:
with lib; {
nixfiles.modules = {
wireguard.client.enable = true;
syncthing.enable = true;
acme.enable = true;
rtorrent.enable = true;
};
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;
};
}
|