l bitlbee: move to statedir

This commit is contained in:
lassulus 2023-09-03 12:01:41 +02:00
parent d0422e3b64
commit 8edd78c982

View File

@ -15,18 +15,20 @@ with (import <stockholm/lib>);
# pkgs.tdlib-purple
# pkgs.purple-gowhatsapp
];
configDir = "/var/state/bitlbee";
};
users.users.bitlbee = {
uid = genid_uint31 "bitlbee";
isSystemUser = true;
group = "bitlbee";
};
users.groups.bitlbee = {};
systemd.services.bitlbee.serviceConfig = {
DynamicUser = lib.mkForce false;
User = "bitlbee";
StateDirectory = lib.mkForce null;
ExecStartPre = [
"+${pkgs.writeDash "setup-bitlbee" ''
${pkgs.coreutils}/bin/chown bitlbee:bitlbee /var/state/bitlbee || :
''}"
];
ReadWritePaths = [
"/var/state/bitlbee"
];
};
systemd.tmpfiles.rules = [
"d /var/state/bitlbee 0700 - - -"
];
}