summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlassulus <git@lassul.us>2023-09-03 12:01:41 +0200
committerlassulus <git@lassul.us>2023-09-03 12:01:41 +0200
commit8edd78c98273812a1239ab95af93f8c3d9664065 (patch)
tree9dc006a1788564f44d077ce5befbbdb5d5993b0a
parentd0422e3b64403cdcc2acd68e432a3671a6f6a502 (diff)
l bitlbee: move to statedir
-rw-r--r--lass/2configs/bitlbee.nix22
1 files changed, 12 insertions, 10 deletions
diff --git a/lass/2configs/bitlbee.nix b/lass/2configs/bitlbee.nix
index 84f06e587..43573d893 100644
--- a/lass/2configs/bitlbee.nix
+++ b/lass/2configs/bitlbee.nix
@@ -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 - - -"
+ ];
}