feat(home:security): move polkit agent to home
This commit is contained in:
parent
ce1e372f0f
commit
2c25c8c762
4 changed files with 54 additions and 3 deletions
|
|
@ -1,15 +1,13 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
# ./themeSettings # done
|
|
||||||
./browser # done -- firefox still need: chrome, brave
|
./browser # done -- firefox still need: chrome, brave
|
||||||
./creative
|
./creative
|
||||||
./communication # only discord implemented
|
./communication # only discord implemented
|
||||||
./media # done -- spotify gui still needs to be implemented
|
./media # done -- spotify gui still needs to be implemented
|
||||||
./terminal # done -- wezterm still needs to be implemented
|
./terminal # done -- wezterm still needs to be implemented
|
||||||
#./wallpaper -- still needs to be implemented
|
|
||||||
#./utility -- still needs to be implemented
|
|
||||||
./wayland # -- almost done, need to implement eww
|
./wayland # -- almost done, need to implement eww
|
||||||
./productivity
|
./productivity
|
||||||
./gaming
|
./gaming
|
||||||
|
./security
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
5
home/modules/desktop/security/default.nix
Normal file
5
home/modules/desktop/security/default.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./polkit
|
||||||
|
];
|
||||||
|
}
|
||||||
46
home/modules/desktop/security/polkit/default.nix
Normal file
46
home/modules/desktop/security/polkit/default.nix
Normal file
|
|
@ -0,0 +1,46 @@
|
||||||
|
{ lib, config, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (lib) mkIf types mkOption;
|
||||||
|
inherit (builtins) elem;
|
||||||
|
cfg = config.homeModules.security.polkit;
|
||||||
|
in
|
||||||
|
|
||||||
|
{
|
||||||
|
options.homeModules.security.polkit = mkOption {
|
||||||
|
type = types.enum ["gnome" "pantheon"]; # TODO: add kde agent
|
||||||
|
default = "";
|
||||||
|
description = "Type of polkit agent module to use";
|
||||||
|
};
|
||||||
|
|
||||||
|
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 = {
|
||||||
|
Type = "simple";
|
||||||
|
ExecStart = "${pkgs.pantheon.pantheon-agent-polkit}/libexec/policykit-1-pantheon/io.elementary.desktop.agent-polkit";
|
||||||
|
Restart = "on-failure";
|
||||||
|
RestartSec = 1;
|
||||||
|
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 = {
|
||||||
|
Type = "simple";
|
||||||
|
ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
|
||||||
|
Restart = "on-failure";
|
||||||
|
RestartSec = 1;
|
||||||
|
TimeoutStopSec = 10;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -30,6 +30,8 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
security.polkit = "pantheon";
|
||||||
|
|
||||||
communication = {
|
communication = {
|
||||||
discord.enable = true;
|
discord.enable = true;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue