configuration/gpg-ssh: Enable users to restart pcscd themself
This commit is contained in:
parent
2970a7d892
commit
5c42594d5d
@ -7,6 +7,7 @@
|
|||||||
./gnome.nix
|
./gnome.nix
|
||||||
./inputs.nix
|
./inputs.nix
|
||||||
./networking.nix
|
./networking.nix
|
||||||
|
./polkit.nix
|
||||||
./power.nix
|
./power.nix
|
||||||
./printing.nix
|
./printing.nix
|
||||||
./ssh.nix
|
./ssh.nix
|
||||||
|
7
configuration/desktop/polkit.nix
Normal file
7
configuration/desktop/polkit.nix
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
security.polkit.enable = true;
|
||||||
|
|
||||||
|
}
|
@ -19,6 +19,21 @@
|
|||||||
|
|
||||||
services.pcscd.enable = true;
|
services.pcscd.enable = true;
|
||||||
|
|
||||||
|
# pcscd sometimes breaks and seem to need a manual restart
|
||||||
|
# so we allow users to restart that service themself
|
||||||
|
security.polkit.extraConfig = ''
|
||||||
|
polkit.addRule(function(action, subject) {
|
||||||
|
if (
|
||||||
|
action.id == "org.freedesktop.systemd1.manage-units"
|
||||||
|
&& action.lookup("unit") == "pcscd.service"
|
||||||
|
&& action.lookup("verb") == "restart"
|
||||||
|
&& subject.isInGroup("users")
|
||||||
|
) {
|
||||||
|
return polkit.Result.YES;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
'';
|
||||||
|
|
||||||
services.udev.packages = with pkgs; [
|
services.udev.packages = with pkgs; [
|
||||||
yubikey-personalization
|
yubikey-personalization
|
||||||
];
|
];
|
||||||
|
Loading…
Reference in New Issue
Block a user