localtime: simplify module a little

This commit is contained in:
Michael Peyton Jones 2018-08-09 15:50:53 +01:00
parent 316669327c
commit 80d4fa725b
No known key found for this signature in database
GPG Key ID: 86A43C24A728F66D

View File

@ -22,14 +22,8 @@ in {
config = mkIf cfg.enable {
services.geoclue2.enable = true;
security.polkit.extraConfig = ''
polkit.addRule(function(action, subject) {
if (action.id == "org.freedesktop.timedate1.set-timezone"
&& subject.user == "localtimed") {
return polkit.Result.YES;
}
});
'';
# so polkit will pick up the rules
environment.systemPackages = [ pkgs.localtime ];
users.users = [{
name = "localtimed";