regreet: fix user group in tmpfiles rules

Prior to this commit the derivation assumed a user's primary group has
the same name as the user themselves. This is standard on linux but not
necessary (and indeed I believe not the default on NixOS).

Closes #232184
This commit is contained in:
Kiran Ostrolenk 2023-09-27 21:52:09 +01:00
parent d442f8a3fc
commit eb2c136196
No known key found for this signature in database
GPG key ID: 0BBB1C8B1C3639EE

View file

@ -66,10 +66,10 @@ in
};
systemd.tmpfiles.rules = let
user = config.services.greetd.settings.default_session.user;
group = config.users.users.${config.services.greetd.settings.default_session.user}.group;
in [
"d /var/log/regreet 0755 greeter ${user} - -"
"d /var/cache/regreet 0755 greeter ${user} - -"
"d /var/log/regreet 0755 greeter ${group} - -"
"d /var/cache/regreet 0755 greeter ${group} - -"
];
};
}