diff --git a/modules/applications/firefox.nix b/modules/applications/firefox.nix index 80fb52a..07bd0e5 100644 --- a/modules/applications/firefox.nix +++ b/modules/applications/firefox.nix @@ -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; diff --git a/modules/security.nix b/modules/security.nix index e695d54..b01bf3e 100644 --- a/modules/security.nix +++ b/modules/security.nix @@ -29,23 +29,35 @@ 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 = '' ACTION=="remove", ATTRS{idVendor}=="1050", RUN+="${pkgs.systemd}/bin/loginctl lock-sessions" ''; - + services.getty.autologinUser = "balsoft"; - + environment.loginShellInit = '' - [[ "$(tty)" == /dev/tty? ]] && sudo /run/current-system/sw/bin/lock this + [[ "$(tty)" == /dev/tty? ]] && sudo /run/current-system/sw/bin/lock this [[ "$(tty)" == /dev/tty1 ]] && sway ''; @@ -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"'' + } '') ]; diff --git a/modules/workspace/sway/default.nix b/modules/workspace/sway/default.nix index e7a8eeb..819486b 100755 --- a/modules/workspace/sway/default.nix +++ b/modules/workspace/sway/default.nix @@ -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'";