aboutsummaryrefslogtreecommitdiff
path: root/modules/private/vpn/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/private/vpn/default.nix')
-rw-r--r--modules/private/vpn/default.nix14
1 files changed, 6 insertions, 8 deletions
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
8 }; 8 };
9 9
10 config = lib.mkIf cfg.enable { 10 config = lib.mkIf cfg.enable {
11 secrets.keys = [ 11 secrets.keys = {
12 { 12 "tinc/key.priv" = {
13 dest = "tinc/key.priv";
14 user = "root"; 13 user = "root";
15 group = "root"; 14 group = "root";
16 permissions = "0400"; 15 permissions = "0400";
17 text = config.myEnv.vpn.eldiron.privateKey; 16 text = config.myEnv.vpn.eldiron.privateKey;
18 } 17 };
19 { 18 "tinc/key.pub" = {
20 dest = "tinc/key.pub";
21 user = "root"; 19 user = "root";
22 group = "root"; 20 group = "root";
23 permissions = "0400"; 21 permissions = "0400";
24 text = config.myEnv.vpn.eldiron.publicKey; 22 text = config.myEnv.vpn.eldiron.publicKey;
25 } 23 };
26 ]; 24 };
27 networking.firewall.allowedTCPPorts = [ 655 1194 ]; 25 networking.firewall.allowedTCPPorts = [ 655 1194 ];
28 system.activationScripts.tinc = let 26 system.activationScripts.tinc = let
29 configFiles = pkgs.runCommand "tinc-files" { 27 configFiles = pkgs.runCommand "tinc-files" {