krebs.tinc: don't bother aliasing packages
This commit is contained in:
parent
5410c7dccc
commit
018018e16b
@ -237,41 +237,39 @@ let
|
|||||||
}
|
}
|
||||||
) config.krebs.tinc;
|
) config.krebs.tinc;
|
||||||
|
|
||||||
krebs.systemd.services = mapAttrs (netname: cfg:
|
krebs.systemd.services = mapAttrs (netname: cfg: {
|
||||||
let
|
description = "Tinc daemon for ${netname}";
|
||||||
tinc = cfg.tincPackage;
|
after = [ "network.target" ];
|
||||||
iproute = cfg.iproutePackage;
|
wantedBy = [ "multi-user.target" ];
|
||||||
in {
|
path = [
|
||||||
description = "Tinc daemon for ${netname}";
|
cfg.iproutePackage
|
||||||
after = [ "network.target" ];
|
cfg.tincPackage
|
||||||
wantedBy = [ "multi-user.target" ];
|
];
|
||||||
path = [ tinc iproute ];
|
reloadIfChanged = true;
|
||||||
reloadIfChanged = true;
|
restartTriggers = [ cfg.confDir ];
|
||||||
restartTriggers = [ cfg.confDir ];
|
serviceConfig = {
|
||||||
serviceConfig = {
|
LoadCredential = filter (x: x != "") [
|
||||||
LoadCredential = filter (x: x != "") [
|
(optionalString (cfg.privkey_ed25519 != null)
|
||||||
(optionalString (cfg.privkey_ed25519 != null)
|
"ed25519_key:${cfg.privkey_ed25519}"
|
||||||
"ed25519_key:${cfg.privkey_ed25519}"
|
)
|
||||||
)
|
"rsa_key:${cfg.privkey}"
|
||||||
"rsa_key:${cfg.privkey}"
|
];
|
||||||
];
|
Restart = "always";
|
||||||
Restart = "always";
|
ExecStart = toString [
|
||||||
ExecStart = toString [
|
"${cfg.tincPackage}/sbin/tincd"
|
||||||
"${tinc}/sbin/tincd"
|
"-D"
|
||||||
"-D"
|
"-U ${cfg.user.name}"
|
||||||
"-U ${cfg.user.name}"
|
"-c /etc/tinc/${netname}"
|
||||||
"-c /etc/tinc/${netname}"
|
"-d 0"
|
||||||
"-d 0"
|
(optionalString (cfg.privkey_ed25519 != null)
|
||||||
(optionalString (cfg.privkey_ed25519 != null)
|
"-o Ed25519PrivateKeyFile=\${CREDENTIALS_DIRECTORY}/ed25519_key"
|
||||||
"-o Ed25519PrivateKeyFile=\${CREDENTIALS_DIRECTORY}/ed25519_key"
|
)
|
||||||
)
|
"-o PrivateKeyFile=\${CREDENTIALS_DIRECTORY}/rsa_key"
|
||||||
"-o PrivateKeyFile=\${CREDENTIALS_DIRECTORY}/rsa_key"
|
"--pidfile=/var/run/tinc.${netname}.pid"
|
||||||
"--pidfile=/var/run/tinc.${netname}.pid"
|
];
|
||||||
];
|
ExecReload = "${cfg.tincPackage}/sbin/tinc -n ${netname} reload";
|
||||||
ExecReload = "${tinc}/sbin/tinc -n ${netname} reload";
|
SyslogIdentifier = netname;
|
||||||
SyslogIdentifier = netname;
|
};
|
||||||
};
|
}) config.krebs.tinc;
|
||||||
}
|
|
||||||
) config.krebs.tinc;
|
|
||||||
};
|
};
|
||||||
in out
|
in out
|
||||||
|
Loading…
Reference in New Issue
Block a user