diff --git a/hosts/by-name/desko/default.nix b/hosts/by-name/desko/default.nix index 20360b7eb..ec21e50b5 100644 --- a/hosts/by-name/desko/default.nix +++ b/hosts/by-name/desko/default.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ pkgs, ... }: { imports = [ ./fs.nix @@ -25,7 +25,6 @@ sane.roles.work = true; sane.services.ollama.enable = true; sane.services.wg-home.enable = true; - sane.services.wg-home.ip = config.sane.hosts.by-name."desko".wg-home.ip; sane.ovpn.addrV4 = "172.26.55.21"; # sane.ovpn.addrV6 = "fd00:0000:1337:cafe:1111:1111:20c1:a73c"; sane.services.rsync-net.enable = true; diff --git a/hosts/by-name/lappy/default.nix b/hosts/by-name/lappy/default.nix index ea515226b..3a0242770 100644 --- a/hosts/by-name/lappy/default.nix +++ b/hosts/by-name/lappy/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ lib, pkgs, ... }: { imports = [ ./fs.nix @@ -7,7 +7,6 @@ sane.roles.client = true; sane.roles.pc = true; sane.services.wg-home.enable = true; - sane.services.wg-home.ip = config.sane.hosts.by-name."lappy".wg-home.ip; sane.ovpn.addrV4 = "172.23.119.72"; # sane.ovpn.addrV6 = "fd00:0000:1337:cafe:1111:1111:0332:aa96/128"; diff --git a/hosts/by-name/moby/default.nix b/hosts/by-name/moby/default.nix index d38d4b673..1190ee575 100644 --- a/hosts/by-name/moby/default.nix +++ b/hosts/by-name/moby/default.nix @@ -6,7 +6,7 @@ # - Mobian wiki: # - recommended apps, chatrooms -{ config, ... }: +{ ... }: { imports = [ ./fs.nix @@ -16,7 +16,6 @@ sane.roles.client = true; sane.roles.handheld = true; sane.services.wg-home.enable = true; - sane.services.wg-home.ip = config.sane.hosts.by-name."moby".wg-home.ip; sane.ovpn.addrV4 = "172.24.87.255"; # sane.ovpn.addrV6 = "fd00:0000:1337:cafe:1111:1111:18cd:a72b"; diff --git a/hosts/by-name/servo/default.nix b/hosts/by-name/servo/default.nix index 3f2162030..2f97a6519 100644 --- a/hosts/by-name/servo/default.nix +++ b/hosts/by-name/servo/default.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ pkgs, ... }: { imports = [ diff --git a/hosts/by-name/servo/net/wg-home.nix b/hosts/by-name/servo/net/wg-home.nix index 5e7140058..6fddfe724 100644 --- a/hosts/by-name/servo/net/wg-home.nix +++ b/hosts/by-name/servo/net/wg-home.nix @@ -4,7 +4,6 @@ sane.services.wg-home.visibleToWan = true; sane.services.wg-home.forwardToWan = true; sane.services.wg-home.routeThroughServo = false; - sane.services.wg-home.ip = config.sane.hosts.by-name."servo".wg-home.ip; services.unbound.settings.server.interface = [ # provide DNS to my wireguard clients config.sane.hosts.by-name."servo".wg-home.ip diff --git a/hosts/modules/wg-home.nix b/hosts/modules/wg-home.nix index 6b502bbf7..fc97adb51 100644 --- a/hosts/modules/wg-home.nix +++ b/hosts/modules/wg-home.nix @@ -33,6 +33,7 @@ in }; sane.services.wg-home.ip = mkOption { type = types.str; + default = config.sane.hosts.by-name."${config.networking.hostName}".wg-home.ip; }; };