lol

nixos/plasma6: add auto timezone handling polkit rule

authored by

K900 and committed by
Sandro Jäckel
a3d359cc 0cb3282a

+13
+13
nixos/modules/services/desktop-managers/plasma6.nix
··· 357 357 }; 358 358 }; 359 359 360 + # Upstream recommends allowing set-timezone and set-ntp so that the KCM and 361 + # the automatic timezone logic work without user interruption. 362 + # However, on NixOS NTP cannot be overwritten via dbus, and timezone 363 + # can only be set if `time.timeZone` is set to `null`. So, we only allow 364 + # set-timezone, and we only allow it when the timezone can actually be set. 365 + security.polkit.extraConfig = lib.mkIf (config.time.timeZone != null) '' 366 + polkit.addRule(function(action, subject) { 367 + if (action.id == "org.freedesktop.timedate1.set-timezone" && subject.active) { 368 + return polkit.Result.YES; 369 + } 370 + }); 371 + ''; 372 + 360 373 programs.dconf.enable = true; 361 374 362 375 programs.firefox.nativeMessagingHosts.packages = [ kdePackages.plasma-browser-integration ];