tinc module: add option enableLegacy
This commit is contained in:
parent
e135090439
commit
0c2dc4ff66
@ -17,6 +17,7 @@ let
|
|||||||
in {
|
in {
|
||||||
|
|
||||||
enable = mkEnableOption "krebs.tinc.${netname}" // { default = true; };
|
enable = mkEnableOption "krebs.tinc.${netname}" // { default = true; };
|
||||||
|
enableLegacy = mkEnableOption "/etc/tinc/${netname}";
|
||||||
|
|
||||||
confDir = mkOption {
|
confDir = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
@ -195,6 +196,12 @@ let
|
|||||||
}
|
}
|
||||||
) config.krebs.tinc;
|
) 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:
|
systemd.services = mapAttrs (netname: cfg:
|
||||||
let
|
let
|
||||||
tinc = cfg.tincPackage;
|
tinc = cfg.tincPackage;
|
||||||
|
Loading…
Reference in New Issue
Block a user