Polkit stuff

This commit is contained in:
Alexander Bantyev 2021-03-18 14:08:07 +03:00
parent ae6c4c3343
commit 2bdccc9fdb
Signed by: balsoft
GPG Key ID: E081FF12ADCB4AD5
3 changed files with 35 additions and 18 deletions

View File

@ -8,6 +8,10 @@ in {
};
programs.browserpass.enable = true;
home-manager.users.balsoft = lib.mkIf (config.deviceSpecific.goodMachine) {
programs.browserpass = {
enable = true;
browsers = [ "firefox" ];
};
programs.firefox = {
enable = true;
package = pkgs.firefox-wayland;

View File

@ -29,13 +29,25 @@
systemd.services."user@" = { serviceConfig = { Restart = "always"; }; };
home-manager.users.balsoft.home.activation.yubi = {
data = ''
mkdir -p .config/Yubico
[ -f /home/balsoft/.config/Yubico/u2f_keys ] || (pamu2fcfg > /home/balsoft/.config/Yubico/u2f_keys)
'';
after = [ "linkGeneration" ];
before = [ ];
home-manager.users.balsoft = {
systemd.user.services.polkit-agent = {
Unit = {
Description = "Run polkit authentication agent";
X-RestartIfChanged = true;
};
Install.WantedBy = [ "sway-session.target" ];
Service = { ExecStart = "${pkgs.mate.mate-polkit}/libexec/polkit-mate-authentication-agent-1"; };
};
home.activation.yubi = {
data = ''
mkdir -p .config/Yubico
[ -f /home/balsoft/.config/Yubico/u2f_keys ] || (pamu2fcfg > /home/balsoft/.config/Yubico/u2f_keys)
'';
after = [ "linkGeneration" ];
before = [ ];
};
};
services.udev.extraRules = ''
@ -62,7 +74,10 @@
then args="-s"
else args="-san"
fi
# ${lib.optionalString (config.deviceSpecific.isLaptop) ''USER=balsoft ${pkgs.vlock}/bin/vlock "$args"''}
# ${
lib.optionalString (config.deviceSpecific.isLaptop)
''USER=balsoft ${pkgs.vlock}/bin/vlock "$args"''
}
'')
];

View File

@ -93,13 +93,11 @@ in {
{ command = apps.browser.cmd; }
{ command = apps.mail.cmd; }
{
command =
"${pkgs.mate.mate-polkit}/libexec/polkit-mate-authentication-agent-1";
}
{ command = "${pkgs.neochat}/bin/neochat"; }
{ command = "${pkgs.xorg.xrdb}/bin/xrdb -merge ~/.Xresources"; }
# {
# command =
# "${pkgs.mate.mate-polkit}/libexec/polkit-mate-authentication-agent-1";
# }
{ command = "${pkgs.nheko}/bin/nheko"; }
{
command =
"swayidle -w before-sleep '${lock_fork}' lock '${lock_fork}' unlock 'pkill -9 swaylock'";