Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,27 @@
};
})
(lib.mkIf config.security.polkit.persistentAuthentication {
assertions =
let
mkMessage = (
package: minVer: ''
To provide persistent authentication, Polkit requires `pidfd` support when fetching process details from D-Bus, which is only available in `${package}` version ${minVer} or later.

Please update the package or switch `services.dbus.implementation` in the configuration.
''
);
in
[
(lib.mkIf (config.services.dbus.implementation == "dbus") {
assertion = lib.versionAtLeast config.services.dbus.dbusPackage.version "1.15.7";
message = mkMessage "dbus" "1.15.7";
Comment thread
LordGrimmauld marked this conversation as resolved.
})
(lib.mkIf (config.services.dbus.implementation == "broker") {
assertion = lib.versionAtLeast config.services.dbus.brokerPackage.version "34";
Comment thread
LordGrimmauld marked this conversation as resolved.
message = mkMessage "dbus-broker" "34";
})
];

security.polkit.extraConfig = ''
polkit.addRule(function(action, subject) {
if (action.id == "org.freedesktop.policykit.exec") {
Expand Down
Loading