blob: d10c6567741ccd793230671272cbd7f0379fd389 (
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
67
68
69
70
71
72
73
74
75
|
{
adminUser,
config,
lib,
modulesPath,
self,
...
}:
{
imports = [
(modulesPath + "/profiles/qemu-guest.nix")
(modulesPath + "/virtualisation/digital-ocean-config.nix")
./disks.nix
./digitalocean.nix
./secrets.nix
{
home-manager.users.${adminUser.name} = {
imports = [
./home.nix
{ home.stateVersion = "25.05"; }
];
};
}
"${self}/profiles/programs/home-manager.nix"
"${self}/profiles/admin-user/user.nix"
"${self}/profiles/admin-user/home-manager.nix"
"${self}/profiles/core/boot.nix"
"${self}/profiles/core/locale.nix"
"${self}/profiles/core/docs.nix"
"${self}/profiles/core/ssh.nix"
"${self}/profiles/core/tools.nix"
"${self}/profiles/core/security.nix"
"${self}/profiles/core/users.nix"
"${self}/profiles/core/motd.nix"
"${self}/profiles/nix/nix.nix"
"${self}/profiles/nix/gc.nix"
"${self}/profiles/network/networkd.nix"
"${self}/profiles/network/firewall.nix"
"${self}/profiles/services/podman.nix"
"${self}/profiles/programs/fish.nix"
./profiles/caddy.nix
];
# do not use DHCP, as DigitalOcean provisions IPs using cloud-init
networking.useDHCP = lib.mkForce false;
networking.hostName = "do-rproxy";
boot.loader.grub = {
efiSupport = true;
efiInstallAsRemovable = true;
};
networking.wireguard = {
enable = true;
interfaces.wg0 = {
ips = [ "10.100.0.50/32" ];
listenPort = 51871;
privateKeyFile = config.age.secrets.wireguard.path;
peers = [
{
publicKey = "bJZyQoemudGJQox8Iegebm23c4BNVIxRPy1kmI2l904=";
allowedIPs = [ "10.100.0.0/24" ];
persistentKeepalive = 25;
}
];
};
};
networking.firewall.trustedInterfaces = [ "wg0" ];
networking.firewall.allowedUDPPorts = [ 51871 ];
system.stateVersion = "25.05"; # Did you read the comment?
}
|