···357357 };
358358 };
359359360360+ # Upstream recommends allowing set-timezone and set-ntp so that the KCM and
361361+ # the automatic timezone logic work without user interruption.
362362+ # However, on NixOS NTP cannot be overwritten via dbus, and timezone
363363+ # can only be set if `time.timeZone` is set to `null`. So, we only allow
364364+ # set-timezone, and we only allow it when the timezone can actually be set.
365365+ security.polkit.extraConfig = lib.mkIf (config.time.timeZone != null) ''
366366+ polkit.addRule(function(action, subject) {
367367+ if (action.id == "org.freedesktop.timedate1.set-timezone" && subject.active) {
368368+ return polkit.Result.YES;
369369+ }
370370+ });
371371+ '';
372372+360373 programs.dconf.enable = true;
361374362375 programs.firefox.nativeMessagingHosts.packages = [ kdePackages.plasma-browser-integration ];