aboutsummaryrefslogtreecommitdiff
path: root/machines/nixos/x86_64-linux/argonath.nix
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2025-11-28 13:10:56 -0800
committerFranck Cuny <franck@fcuny.net>2025-11-28 13:10:56 -0800
commit988005d5d57768a9cf934697e9dd8fd417c66db7 (patch)
tree4b3dbf9d7ccf23d51d4d97fc699e01debaf76d35 /machines/nixos/x86_64-linux/argonath.nix
parentthe VM on the synology was reinstalled (diff)
downloadinfra-988005d5d57768a9cf934697e9dd8fd417c66db7.tar.gz
add a profile for wireguard configuration
Diffstat (limited to 'machines/nixos/x86_64-linux/argonath.nix')
-rw-r--r--machines/nixos/x86_64-linux/argonath.nix41
1 files changed, 3 insertions, 38 deletions
diff --git a/machines/nixos/x86_64-linux/argonath.nix b/machines/nixos/x86_64-linux/argonath.nix
index 218df5a..4b72ca9 100644
--- a/machines/nixos/x86_64-linux/argonath.nix
+++ b/machines/nixos/x86_64-linux/argonath.nix
@@ -1,9 +1,4 @@
-{
- config,
- lib,
- adminUser,
- ...
-}:
+{ adminUser, ... }:
{
imports = [
../../../profiles/acme.nix
@@ -14,40 +9,10 @@
../../../profiles/home-manager.nix
../../../profiles/reverse-proxy.nix
../../../profiles/server.nix
+ ../../../profiles/wireguard.nix
];
- age.secrets.wireguard.file = ../../../secrets/argonath/wireguard.age;
-
- # fixes duplicated devices in mirroredBoots
- boot.loader.grub.devices = lib.mkForce [ "/dev/vda" ];
-
- disko.devices.disk.disk1.device = "/dev/vda";
-
- networking.wireguard = {
- enable = true;
- interfaces.wg0 = {
- ips = [ "10.100.0.51/32" ];
- listenPort = 51871;
- privateKeyFile = config.age.secrets.wireguard.path;
- peers = [
- {
- # bree
- publicKey = "bJZyQoemudGJQox8Iegebm23c4BNVIxRPy1kmI2l904=";
- allowedIPs = [ "10.100.0.40/32" ];
- persistentKeepalive = 25;
- }
- {
- # rivendell
- publicKey = "jf7T7TMKQWSgSXhUplldZDV9G2y2BjMmHIAhg5d26ng=";
- allowedIPs = [ "10.100.0.60/32" ];
- persistentKeepalive = 25;
- }
- ];
- };
- };
-
- networking.firewall.trustedInterfaces = [ "wg0" ];
- networking.firewall.allowedUDPPorts = [ 51871 ];
+ networking.hostName = "argonath";
system.stateVersion = "25.05"; # Did you read the comment?