blob: b827dd9e509f64a7f6b2cfbcc908d8e33ed6d831 (
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
{
config,
lib,
...
}:
{
nixfiles.modules = {
wireguard.client.enable = true;
syncthing.enable = true;
acme.enable = true;
piracy = {
enable = true;
lidarr.enable = true;
radarr.enable = false;
sonarr.enable = false;
};
};
services.nfs.server = {
enable = true;
exports =
lib.concatMapStringsSep "\n"
(
dir:
let
target = s: "${s}(insecure,ro,no_subtree_check)";
v4 = target config.nixfiles.modules.wireguard.ipv4.subnet;
v6 = target config.nixfiles.modules.wireguard.ipv6.subnet;
in
"${dir} ${v4} ${v6}"
)
[
"/export/rtorrent"
"/export/music"
];
};
boot.loader.grub = {
enable = true;
device = "/dev/sda";
configurationLimit = 5;
};
fileSystems = {
"/" = {
device = "/dev/sda2";
fsType = "ext4";
options = [ "noatime" ];
};
"/export/music" = {
device = "/var/lib/lidarr/root";
options = [ "bind" ];
};
};
swapDevices = [ { device = "/dev/sda3"; } ];
zramSwap = {
enable = true;
memoryPercent = 50;
};
}
|