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"
|
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 = {
|
security.pam.u2f = {
|
||||||
control = "sufficient";
|
control = "sufficient";
|
||||||
@ -48,6 +50,11 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = [
|
||||||
|
(pkgs.writeShellScriptBin "lock"
|
||||||
|
"USER=balsoft ${pkgs.vlock}/bin/vlock -san")
|
||||||
|
];
|
||||||
|
|
||||||
security.pam.services = builtins.listToAttrs (builtins.map (name: {
|
security.pam.services = builtins.listToAttrs (builtins.map (name: {
|
||||||
inherit name;
|
inherit name;
|
||||||
value = { unixAuth = false; };
|
value = { unixAuth = false; };
|
||||||
@ -80,6 +87,7 @@
|
|||||||
security.sudo = {
|
security.sudo = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraConfig = ''
|
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 -A 5
|
||||||
balsoft ALL = (root) NOPASSWD: ${pkgs.light}/bin/light -U 5
|
balsoft ALL = (root) NOPASSWD: ${pkgs.light}/bin/light -U 5
|
||||||
'';
|
'';
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
let
|
let
|
||||||
thm = config.themes.colors;
|
thm = config.themes.colors;
|
||||||
apps = config.defaultApplications;
|
apps = config.defaultApplications;
|
||||||
lock_fork = pkgs.writeShellScript "lock_fork" "/run/wrappers/bin/vlock -san &";
|
lock_fork = pkgs.writeShellScript "lock_fork" "sudo /run/current-system/sw/bin/lock &";
|
||||||
lock = pkgs.writeShellScript "lock" "swaymsg 'output * dpms off'; /run/wrappers/bin/vlock -san; swaymsg 'output * dpms on'";
|
lock = pkgs.writeShellScript "lock" "swaymsg 'output * dpms off'; sudo /run/current-system/sw/bin/lock; swaymsg 'output * dpms on'";
|
||||||
in {
|
in {
|
||||||
environment.sessionVariables._JAVA_AWT_WM_NONREPARENTING = "1";
|
environment.sessionVariables._JAVA_AWT_WM_NONREPARENTING = "1";
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user