Update modules/users.nix modules/workspace/i3/default.nix
This commit is contained in:
parent
8983481dc1
commit
9fda500a7f
@ -40,7 +40,9 @@
|
||||
ACTION=="remove", ATTRS{idVendor}=="1050", RUN+="${pkgs.systemd}/bin/loginctl lock-sessions"
|
||||
'';
|
||||
|
||||
security.wrappers.vlock.source = "${pkgs.vlock}/bin/vlock";
|
||||
services.mingetty.autologinUser = "balsoft";
|
||||
|
||||
environment.loginShellInit = "sudo /run/current-system/sw/bin/lock; sway";
|
||||
|
||||
security.pam.u2f = {
|
||||
control = "sufficient";
|
||||
@ -48,6 +50,11 @@
|
||||
enable = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = [
|
||||
(pkgs.writeShellScriptBin "lock"
|
||||
"USER=balsoft ${pkgs.vlock}/bin/vlock -san")
|
||||
];
|
||||
|
||||
security.pam.services = builtins.listToAttrs (builtins.map (name: {
|
||||
inherit name;
|
||||
value = { unixAuth = false; };
|
||||
@ -80,6 +87,7 @@
|
||||
security.sudo = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
balsoft ALL = (root) NOPASSWD: /run/current-system/sw/bin/lock
|
||||
balsoft ALL = (root) NOPASSWD: ${pkgs.light}/bin/light -A 5
|
||||
balsoft ALL = (root) NOPASSWD: ${pkgs.light}/bin/light -U 5
|
||||
'';
|
||||
|
@ -2,8 +2,8 @@
|
||||
let
|
||||
thm = config.themes.colors;
|
||||
apps = config.defaultApplications;
|
||||
lock_fork = pkgs.writeShellScript "lock_fork" "/run/wrappers/bin/vlock -san &";
|
||||
lock = pkgs.writeShellScript "lock" "swaymsg 'output * dpms off'; /run/wrappers/bin/vlock -san; swaymsg 'output * dpms on'";
|
||||
lock_fork = pkgs.writeShellScript "lock_fork" "sudo /run/current-system/sw/bin/lock &";
|
||||
lock = pkgs.writeShellScript "lock" "swaymsg 'output * dpms off'; sudo /run/current-system/sw/bin/lock; swaymsg 'output * dpms on'";
|
||||
in {
|
||||
environment.sessionVariables._JAVA_AWT_WM_NONREPARENTING = "1";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user