diff options
author | Franck Cuny <franck@fcuny.net> | 2023-05-08 19:33:35 -0700 |
---|---|---|
committer | Franck Cuny <franck@fcuny.net> | 2023-05-08 19:33:35 -0700 |
commit | 4ec55bc970a48ef49763b6b4768da3ed95c71e0d (patch) | |
tree | ec7d019b2378d1127e41b76e2e3061e3f88b0d3d | |
parent | profile/acme: default DNS provider is gandi (diff) | |
download | world-4ec55bc970a48ef49763b6b4768da3ed95c71e0d.tar.gz |
modules/wireguard: move the module to the right location
-rw-r--r-- | modules/private-wireguard.nix (renamed from nix/private-wireguard.nix) | 6 | ||||
-rw-r--r-- | nix/mkSystem.nix | 2 |
2 files changed, 4 insertions, 4 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; diff --git a/nix/mkSystem.nix b/nix/mkSystem.nix index 1403538..d2e7ebf 100644 --- a/nix/mkSystem.nix +++ b/nix/mkSystem.nix @@ -10,7 +10,7 @@ inputs.nixpkgs.lib.nixosSystem { "${self}/modules" "${self}/hosts/${hostname}" "${self}/modules/homelab" - ./private-wireguard.nix + "${self}/modules/private-wireguard.nix" { networking.hostName = hostname; nixpkgs = { |