Setup polkit
This commit is contained in:
parent
fa50312ef7
commit
2360497a9a
|
@ -52,6 +52,8 @@ in with lib; {
|
|||
inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}.wob
|
||||
# For fancy x11 scaling
|
||||
inputs.self.packages.${pkgs.system}.sommelier
|
||||
# Polkit
|
||||
polkit_gnome
|
||||
];
|
||||
#########################
|
||||
## Sway
|
||||
|
@ -278,6 +280,20 @@ in with lib; {
|
|||
${layman-package}/bin/layman || true
|
||||
'';
|
||||
};
|
||||
# Setup polkit as a service
|
||||
systemd.user.services.polkit-gnome = {
|
||||
Unit = {
|
||||
Description = "Polkit gnome authentication agent";
|
||||
After = [ "graphical-session.target" ];
|
||||
};
|
||||
Service = {
|
||||
Type = "simple";
|
||||
ExecStart =
|
||||
"${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
Install = { WantedBy = [ "graphical-session.target" ]; };
|
||||
};
|
||||
#########################
|
||||
## Mako (notifications)
|
||||
#########################
|
||||
|
|
|
@ -5,6 +5,18 @@ let
|
|||
in with lib; {
|
||||
config = mkMerge [
|
||||
{
|
||||
security.polkit = {
|
||||
enable = true;
|
||||
# TODO: Refine the wheel branch to only include nessicary actions
|
||||
# extraConfig = ''
|
||||
# polkit.addRule(function(action, subject) {
|
||||
# if (subject.isInGroup("wheel"))
|
||||
# {
|
||||
# return polkit.Result.YES;
|
||||
# }
|
||||
# })
|
||||
# '';
|
||||
};
|
||||
environment.shells = [ pkgs.fish ];
|
||||
users = {
|
||||
# If we install the user and the system is hardended, then disable mutable users
|
||||
|
|
Loading…
Reference in New Issue