tinc module: add option enableLegacy
This commit is contained in:
parent
e135090439
commit
0c2dc4ff66
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user