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
|
inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}.wob
|
||||||
# For fancy x11 scaling
|
# For fancy x11 scaling
|
||||||
inputs.self.packages.${pkgs.system}.sommelier
|
inputs.self.packages.${pkgs.system}.sommelier
|
||||||
|
# Polkit
|
||||||
|
polkit_gnome
|
||||||
];
|
];
|
||||||
#########################
|
#########################
|
||||||
## Sway
|
## Sway
|
||||||
|
@ -278,6 +280,20 @@ in with lib; {
|
||||||
${layman-package}/bin/layman || true
|
${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)
|
## Mako (notifications)
|
||||||
#########################
|
#########################
|
||||||
|
|
|
@ -5,6 +5,18 @@ let
|
||||||
in with lib; {
|
in with lib; {
|
||||||
config = mkMerge [
|
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 ];
|
environment.shells = [ pkgs.fish ];
|
||||||
users = {
|
users = {
|
||||||
# If we install the user and the system is hardended, then disable mutable users
|
# If we install the user and the system is hardended, then disable mutable users
|
||||||
|
|
Loading…
Reference in New Issue