Merge staging-next into staging
This commit is contained in:
@@ -36,11 +36,11 @@ config = mkIf cfg.enable {
|
||||
preStart = ''
|
||||
if [ ! -d ${cfg.settingsDir} ] ; then
|
||||
mkdir -m 0750 -p ${cfg.settingsDir}
|
||||
chown -R gateone.gateone ${cfg.settingsDir}
|
||||
chown -R gateone:gateone ${cfg.settingsDir}
|
||||
fi
|
||||
if [ ! -d ${cfg.pidDir} ] ; then
|
||||
mkdir -m 0750 -p ${cfg.pidDir}
|
||||
chown -R gateone.gateone ${cfg.pidDir}
|
||||
chown -R gateone:gateone ${cfg.pidDir}
|
||||
fi
|
||||
'';
|
||||
#unitConfig.RequiresMountsFor = "${cfg.settingsDir}";
|
||||
|
||||
@@ -98,7 +98,7 @@ serverinfo {
|
||||
*
|
||||
* openssl genrsa -out rsa.key 2048
|
||||
* openssl rsa -in rsa.key -pubout -out rsa.pub
|
||||
* chown <ircd-user>.<ircd.group> rsa.key rsa.pub
|
||||
* chown <ircd-user>:<ircd.group> rsa.key rsa.pub
|
||||
* chmod 0600 rsa.key
|
||||
* chmod 0644 rsa.pub
|
||||
*/
|
||||
|
||||
@@ -108,7 +108,7 @@ with lib;
|
||||
#username pptpd password *
|
||||
EOF
|
||||
|
||||
chown root.root "$secrets"
|
||||
chown root:root "$secrets"
|
||||
chmod 600 "$secrets"
|
||||
'';
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ in
|
||||
serviceConfig.Type = "forking";
|
||||
preStart = ''
|
||||
mkdir -m 0755 -p ${stateDir}
|
||||
chown ${prayerUser}.${prayerGroup} ${stateDir}
|
||||
chown ${prayerUser}:${prayerGroup} ${stateDir}
|
||||
'';
|
||||
script = "${prayer}/sbin/prayer --config-file=${prayerCfg}";
|
||||
};
|
||||
|
||||
@@ -4,7 +4,7 @@ with lib;
|
||||
|
||||
let cfg = config.services.tailscale;
|
||||
in {
|
||||
meta.maintainers = with maintainers; [ danderson mbaillie ];
|
||||
meta.maintainers = with maintainers; [ danderson mbaillie twitchyliquid64 ];
|
||||
|
||||
options.services.tailscale = {
|
||||
enable = mkEnableOption "Tailscale client daemon";
|
||||
@@ -40,13 +40,29 @@ in {
|
||||
systemd.packages = [ cfg.package ];
|
||||
systemd.services.tailscaled = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
path = [ pkgs.openresolv pkgs.procps ];
|
||||
path = [
|
||||
pkgs.openresolv # for configuring DNS in some configs
|
||||
pkgs.procps # for collecting running services (opt-in feature)
|
||||
pkgs.glibc # for `getent` to look up user shells
|
||||
];
|
||||
serviceConfig.Environment = [
|
||||
"PORT=${toString cfg.port}"
|
||||
''"FLAGS=--tun ${lib.escapeShellArg cfg.interfaceName}"''
|
||||
] ++ (lib.optionals (cfg.permitCertUid != null) [
|
||||
"TS_PERMIT_CERT_UID=${cfg.permitCertUid}"
|
||||
]);
|
||||
# Restart tailscaled with a single `systemctl restart` at the
|
||||
# end of activation, rather than a `stop` followed by a later
|
||||
# `start`. Activation over Tailscale can hang for tens of
|
||||
# seconds in the stop+start setup, if the activation script has
|
||||
# a significant delay between the stop and start phases
|
||||
# (e.g. script blocked on another unit with a slow shutdown).
|
||||
#
|
||||
# Tailscale is aware of the correctness tradeoff involved, and
|
||||
# already makes its upstream systemd unit robust against unit
|
||||
# version mismatches on restart for compatibility with other
|
||||
# linux distros.
|
||||
stopIfChanged = false;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -383,9 +383,9 @@ in
|
||||
};
|
||||
preStart = ''
|
||||
mkdir -p /etc/tinc/${network}/hosts
|
||||
chown tinc.${network} /etc/tinc/${network}/hosts
|
||||
chown tinc:${network} /etc/tinc/${network}/hosts
|
||||
mkdir -p /etc/tinc/${network}/invitations
|
||||
chown tinc.${network} /etc/tinc/${network}/invitations
|
||||
chown tinc:${network} /etc/tinc/${network}/invitations
|
||||
|
||||
# Determine how we should generate our keys
|
||||
if type tinc >/dev/null 2>&1; then
|
||||
|
||||
@@ -116,18 +116,18 @@ with lib;
|
||||
#username xl2tpd password *
|
||||
EOF
|
||||
|
||||
chown root.root ppp/chap-secrets
|
||||
chown root:root ppp/chap-secrets
|
||||
chmod 600 ppp/chap-secrets
|
||||
|
||||
# The documentation says this file should be present but doesn't explain why and things work even if not there:
|
||||
[ -f l2tp-secrets ] || (echo -n "* * "; ${pkgs.apg}/bin/apg -n 1 -m 32 -x 32 -a 1 -M LCN) > l2tp-secrets
|
||||
chown root.root l2tp-secrets
|
||||
chown root:root l2tp-secrets
|
||||
chmod 600 l2tp-secrets
|
||||
|
||||
popd > /dev/null
|
||||
|
||||
mkdir -p /run/xl2tpd
|
||||
chown root.root /run/xl2tpd
|
||||
chown root:root /run/xl2tpd
|
||||
chmod 700 /run/xl2tpd
|
||||
'';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user