-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathhost-nuc.nix
66 lines (61 loc) · 1.4 KB
/
host-nuc.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
{ config, ... }:
{
imports = [
./hardware/nuc.nix
./modules/alertmanager.nix
./modules/backup.nix
./modules/cachix.nix
./modules/consul/server.nix
./modules/grafana
./modules/loki.nix
./modules/mqtt.nix
./modules/prometheus.nix
./modules/push-notifications.nix
./modules/remote-builder
./modules/server.nix
./modules/traefik.nix
./modules/vpn.nix
./modules/webhook.nix
];
services.tailscale = {
useRoutingFeatures = "server";
extraUpFlags = "--advertise-exit-node";
};
containers.git = {
autoStart = true;
macvlans = [ "eno1" ];
bindMounts = {
"/srv/git" = {
hostPath = "/srv/git";
isReadOnly = false;
};
};
config =
{ config, lib, ... }:
{
imports = [
./modules/git.nix
./modules/vpn.nix
];
networking.useDHCP = lib.mkForce true;
system.stateVersion = "24.05";
services.tailscale.interfaceName = "userspace-networking";
};
};
services.borgbackup.jobs.git = {
paths = "/srv/git";
repo = "borg@nuc:.";
environment = { BORG_RSH = "ssh -i /root/keys/id_ed25519-borg-git"; };
encryption.mode = "none";
doInit = false;
startAt = "daily";
prune.keep = {
within = "1d";
daily = 7;
weekly = 4;
monthly = 12;
yearly = 10;
};
};
system.stateVersion = "22.05";
}