blob: 6f0d848bee6ed903298ebf15bc7e164308a9416a (
plain)
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
|
{
config,
pkgs,
inputs,
lib,
...
}:
with lib; {
nixfiles.modules = {
wireguard.client.enable = true;
syncthing.enable = true;
acme.enable = true;
rtorrent.enable = true;
lidarr.enable = true;
jackett.enable = true;
};
# TODO Wait for https://github.com/NixOS/nixpkgs/pull/265696
disabledModules = ["services/monitoring/prometheus/exporters.nix"];
imports = ["${inputs.nixpkgs-local}/nixos/modules/services/monitoring/prometheus/exporters.nix"];
services.prometheus.exporters.exportarr-lidarr = {
enable = true;
url = "http://127.0.0.1";
apiKeyFile = pkgs.writeText "api-key" "5a4311dd98a240b6a9fe0cac9146341e";
port = mkDefault 9708;
inherit (config.services.lidarr) user;
inherit (config.services.lidarr) group;
listenAddress = this.wireguard.ipv4.address;
environment.CONFIG = "/var/lib/lidarr/.config/Lidarr/config.xml";
};
boot.loader.grub = {
enable = true;
device = "/dev/sda";
configurationLimit = 5;
};
fileSystems."/" = {
device = "/dev/sda2";
fsType = "ext4";
options = ["noatime"];
};
swapDevices = [{device = "/dev/sda3";}];
zramSwap = {
enable = true;
memoryPercent = 25;
};
}
|