diff options
author | lassulus <lass@lassul.us> | 2017-05-16 23:19:08 +0200 |
---|---|---|
committer | lassulus <lass@lassul.us> | 2017-05-16 23:20:37 +0200 |
commit | 0c2dc4ff66eded9f718a242bb342b366ee6c6978 (patch) | |
tree | fa3410b870459ab441f044173baecb225e534e7f /krebs/3modules | |
parent | e1350904390ca40e9ab8186c0ff27d088431a430 (diff) |
tinc module: add option enableLegacy
Diffstat (limited to 'krebs/3modules')
-rw-r--r-- | krebs/3modules/tinc.nix | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/krebs/3modules/tinc.nix b/krebs/3modules/tinc.nix index 67d383bb1..8af15c13b 100644 --- a/krebs/3modules/tinc.nix +++ b/krebs/3modules/tinc.nix @@ -17,6 +17,7 @@ let in { enable = mkEnableOption "krebs.tinc.${netname}" // { default = true; }; + enableLegacy = mkEnableOption "/etc/tinc/${netname}"; confDir = mkOption { type = types.package; @@ -195,6 +196,12 @@ let } ) config.krebs.tinc; + environment.etc = mapAttrs' (netname: cfg: + nameValuePair "tinc/${netname}" (mkIf cfg.enableLegacy { + source = cfg.confDir; + }) + ) config.krebs.tinc; + systemd.services = mapAttrs (netname: cfg: let tinc = cfg.tincPackage; |