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