-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.nix
executable file
·113 lines (107 loc) · 2.65 KB
/
default.nix
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
{
pkgs,
config,
inputs,
...
}: {
imports = [
./hardware-configuration.nix
../../common/core.nix
../../common/services/homepage.nix
#../../common/user-group.nix
../../common/tailscale.nix
inputs.nixos-hardware.nixosModules.common-pc-ssd
];
topology.self = {
hardware.info = "Raspberry Pi NAS";
interfaces.wlan0 = {
network = "home"; # Use the network we define below
};
};
systemd.sysusers.enable = false; #FIXME https://github.com/ryantm/agenix/issues/238
services.openssh.enable = true;
nixarr = {
enable = true;
mediaDir = "/media";
stateDir = "/media/.state/nixarr";
mediaUsers = ["tilli" "chaimae"];
jellyfin.enable = true;
transmission = {
enable = true;
openFirewall = true;
extraSettings = {
umask = 18;
download-queue-size = 15;
rpc-host-whitelist = "${config.networking.hostName}.local";
};
};
bazarr.enable = true;
#lidarr.enable = true;
prowlarr.enable = true;
radarr.enable = true;
#readarr.enable = true;
sonarr.enable = true;
};
services.jellyseerr.enable = true;
systemd.services.jellyseerr.environment.LOG_LEVEL = "warning";
environment.systemPackages = [
pkgs.recyclarr
];
services.grafana = {
enable = true;
domain = "marrekech.baumann.ma";
settings = {
server.http_addr = "0.0.0.0";
analytics.reporting_enabled = false;
};
# FIXME security.admin_password
provision.enable = true;
provision.datasources = {
settings.datasources = [
{
name = "Prometheus";
type = "prometheus";
url = "http://nas.local:${toString config.services.prometheus.port}";
}
];
};
};
services.prometheus = {
enable = true;
exporters = {
node.enable = true;
};
scrapeConfigs = [
{
job_name = "ntp-rs";
static_configs = [
{
targets = ["localhost:9975"];
}
];
}
{
job_name = "node";
static_configs = [
{
targets = [
"localhost:${toString config.services.prometheus.exporters.node.port}"
"zuse.local:${toString config.services.prometheus.exporters.node.port}"
"zuse-klappi.local:${toString config.services.prometheus.exporters.node.port}"
];
}
];
}
];
};
/*
services.immich = {
enable = true;
mediaLocation = "${config.nixarr.mediaDir}/immich";
};
*/
services.resolved.enable = true;
services.resolved.dnssec = "false";
services.ntpd-rs.metrics.enable = true;
networking.hostName = "nas";
}