diff options
author | sinanmohd <sinan@sinanmohd.com> | 2025-06-10 15:55:54 +0530 |
---|---|---|
committer | sinanmohd <sinan@sinanmohd.com> | 2025-06-10 22:55:04 +0530 |
commit | a41037ef644dbacb3d577933fb3d93c210439b38 (patch) | |
tree | a262750bcb1357785ad8cb68b232a5ca242ee671 /os/pc/modules/nopolkit.nix | |
parent | cfccbd1e4026d568e23a47c060ae3ae042cceb4c (diff) |
chore(repo): reformat with nixfmt-rfc-style
Diffstat (limited to 'os/pc/modules/nopolkit.nix')
-rw-r--r-- | os/pc/modules/nopolkit.nix | 45 |
1 files changed, 26 insertions, 19 deletions
diff --git a/os/pc/modules/nopolkit.nix b/os/pc/modules/nopolkit.nix index 0c45f41..f7148aa 100644 --- a/os/pc/modules/nopolkit.nix +++ b/os/pc/modules/nopolkit.nix @@ -1,26 +1,33 @@ -{ config, pkgs, ... }: let +{ config, pkgs, ... }: +let user = config.global.userdata.name; -in { +in +{ security.sudo = { enable = true; - extraRules = [{ - commands = [ - { - command = "${pkgs.systemd}/bin/systemctl suspend-then-hibernate"; - options = [ "SETENV" "NOPASSWD" ]; - } - { - command = "${pkgs.systemd}/bin/reboot"; - options = [ "NOPASSWD" ]; - } - { - command = "${pkgs.systemd}/bin/poweroff"; - options = [ "NOPASSWD" ]; - } - ]; + extraRules = [ + { + commands = [ + { + command = "${pkgs.systemd}/bin/systemctl suspend-then-hibernate"; + options = [ + "SETENV" + "NOPASSWD" + ]; + } + { + command = "${pkgs.systemd}/bin/reboot"; + options = [ "NOPASSWD" ]; + } + { + command = "${pkgs.systemd}/bin/poweroff"; + options = [ "NOPASSWD" ]; + } + ]; - users = [ user ]; - }]; + users = [ user ]; + } + ]; }; } |