Update modules/users.nix

This commit is contained in:
Alexander Bantyev 2020-03-01 21:10:51 +03:00
parent ab7ac11c94
commit 0d76ef212a
1 changed files with 32 additions and 1 deletions

View File

@ -28,7 +28,8 @@
systemd.services."user@" = { serviceConfig = { Restart = "always"; }; }; systemd.services."user@" = { serviceConfig = { Restart = "always"; }; };
home-manager.users.balsoft.home.activation.yubi = { home-manager.users.balsoft.home.activation.yubi = {
data = "[ -s /home/balsoft/.config/Yubico/u2f_keys ] || (pamu2fcfg > /home/balsoft/.config/Yubico/u2f_keys)"; data =
"[ -s /home/balsoft/.config/Yubico/u2f_keys ] || (pamu2fcfg > /home/balsoft/.config/Yubico/u2f_keys)";
after = [ "linkGeneration" ]; after = [ "linkGeneration" ];
before = [ ]; before = [ ];
}; };
@ -47,6 +48,36 @@
cue = true; cue = true;
enable = true; enable = true;
}; };
security.pam.services = builtins.listToAttrs (builtins.map (name: {
inherit name;
value = { unixAuth = false; };
}) [
"chpasswd"
"chsh"
"groupadd"
"groupdel"
"groupmems"
"groupmod"
"i3lock"
"i3lock-color"
"login"
"passwd"
"polkit-1"
"runuser"
"runuser-l"
"su"
"sudo"
"swaylock"
"systemd-user"
"useradd"
"userdel"
"usermod"
"vlock"
"xlock"
"xscreensaver"
]);
security.sudo = { security.sudo = {
enable = true; enable = true;
extraConfig = '' extraConfig = ''