From 4c4652aabf2cb3ac8b40f2856eca07a1df9c27e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Sat, 16 Oct 2021 17:40:07 +0200 Subject: Use attrs for secrets instead of lists --- modules/private/vpn/default.nix | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'modules/private/vpn/default.nix') diff --git a/modules/private/vpn/default.nix b/modules/private/vpn/default.nix index a9051af..d4b197d 100644 --- a/modules/private/vpn/default.nix +++ b/modules/private/vpn/default.nix @@ -8,22 +8,20 @@ in }; config = lib.mkIf cfg.enable { - secrets.keys = [ - { - dest = "tinc/key.priv"; + secrets.keys = { + "tinc/key.priv" = { user = "root"; group = "root"; permissions = "0400"; text = config.myEnv.vpn.eldiron.privateKey; - } - { - dest = "tinc/key.pub"; + }; + "tinc/key.pub" = { user = "root"; group = "root"; permissions = "0400"; text = config.myEnv.vpn.eldiron.publicKey; - } - ]; + }; + }; networking.firewall.allowedTCPPorts = [ 655 1194 ]; system.activationScripts.tinc = let configFiles = pkgs.runCommand "tinc-files" { -- cgit v1.2.3