fix(homeModules:polkit): syntax
This commit is contained in:
parent
85e692f8ef
commit
bb326be2aa
1 changed files with 20 additions and 12 deletions
|
|
@ -3,11 +3,11 @@
|
|||
let
|
||||
inherit (lib) mkIf types mkOption;
|
||||
inherit (builtins) elem;
|
||||
cfg = config.homeModules.security.polkit;
|
||||
cfg = config.homeModules.desktop.security.polkit;
|
||||
in
|
||||
|
||||
{
|
||||
options.homeModules.security.polkit = mkOption {
|
||||
options.homeModules.desktop.security.polkit = mkOption {
|
||||
type = types.enum ["gnome" "pantheon"]; # TODO: add kde agent
|
||||
default = "";
|
||||
description = "Type of polkit agent module to use";
|
||||
|
|
@ -16,11 +16,15 @@ in
|
|||
config = {
|
||||
systemd.user.services = {
|
||||
polkit-pantheon-authentication-agent-1 = mkIf (elem cfg ["pantheon"]) {
|
||||
description = "polkit-pantheon-authentication-agent-1";
|
||||
wantedBy = [ "graphical-session.target" ];
|
||||
wants = [ "graphical-session.target" ];
|
||||
after = [ "graphical-session.target" ];
|
||||
serviceConfig = {
|
||||
Unit.Description = "polkit-pantheon-authentication-agent-1";
|
||||
|
||||
Install = {
|
||||
WantedBy = [ "graphical-session.target" ];
|
||||
Wants = [ "graphical-session.target" ];
|
||||
After = [ "graphical-session.target" ];
|
||||
};
|
||||
|
||||
Service = {
|
||||
Type = "simple";
|
||||
ExecStart = "${pkgs.pantheon.pantheon-agent-polkit}/libexec/policykit-1-pantheon/io.elementary.desktop.agent-polkit";
|
||||
Restart = "on-failure";
|
||||
|
|
@ -28,12 +32,16 @@ in
|
|||
TimeoutStopSec = 10;
|
||||
};
|
||||
};
|
||||
|
||||
polkit-gnome-authentication-agent-1 = mkIf (elem cfg ["gnome"]) {
|
||||
description = "polkit-pantheon-authentication-agent-1";
|
||||
wantedBy = [ "graphical-session.target" ];
|
||||
wants = [ "graphical-session.target" ];
|
||||
after = [ "graphical-session.target" ];
|
||||
serviceConfig = {
|
||||
Unit.Description = "polkit-pantheon-authentication-agent-1";
|
||||
Install = {
|
||||
WantedBy = [ "graphical-session.target" ];
|
||||
Wants = [ "graphical-session.target" ];
|
||||
After = [ "graphical-session.target" ];
|
||||
};
|
||||
|
||||
Service = {
|
||||
Type = "simple";
|
||||
ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
|
||||
Restart = "on-failure";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue