diff options
Diffstat (limited to '')
-rw-r--r-- | modules/private-wireguard.nix (renamed from nix/private-wireguard.nix) | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nix/private-wireguard.nix b/modules/private-wireguard.nix index 8e5d74c..d4ad676 100644 --- a/nix/private-wireguard.nix +++ b/modules/private-wireguard.nix @@ -1,12 +1,12 @@ -{ lib, hostname, config, ... }: +{ lib, hostname, config, self, ... }: let inherit (lib) mkEnableOption mkOption mkIf types; - inherit (builtins) readFile fromTOML fromJSON; + inherit (builtins) readFile fromTOML; secrets = config.age.secrets; cfg = config.networking.private-wireguard; port = 51871; - wgcfg = fromTOML (readFile ./../configs/wireguard.toml); + wgcfg = fromTOML (readFile "${self}/configs/wireguard.toml"); allPeers = wgcfg.peers; thisPeer = allPeers."${hostname}" or null; otherPeers = lib.filterAttrs (n: v: n != hostname) allPeers; |