From 5658bb7f8bf3522c501864ea73024f544b14de3a Mon Sep 17 00:00:00 2001 From: Fuwn Date: Sun, 22 Sep 2024 15:23:35 -0700 Subject: core: move kansai security to desktop --- modules/core/security/sudo.nix | 75 ------------------------------------------ 1 file changed, 75 deletions(-) delete mode 100644 modules/core/security/sudo.nix (limited to 'modules/core/security/sudo.nix') diff --git a/modules/core/security/sudo.nix b/modules/core/security/sudo.nix deleted file mode 100644 index 6623b71..0000000 --- a/modules/core/security/sudo.nix +++ /dev/null @@ -1,75 +0,0 @@ -{ pkgs, lib, ... }: -let - inherit (lib.modules) mkForce; -in -{ - security = { - sudo-rs.enable = mkForce false; - - sudo = { - enable = true; - execWheelOnly = mkForce true; - wheelNeedsPassword = lib.modules.mkDefault false; - - extraConfig = '' - Defaults lecture = never - Defaults pwfeedback - Defaults env_keep += "EDITOR PATH DISPLAY" - Defaults timestamp_timeout = 300 - ''; - - extraRules = [ - { - groups = [ "wheel" ]; - commands = - map - (rule: { - command = lib.meta.getExe' rule.package rule.command; - options = [ "NOPASSWD" ]; - }) - ( - with pkgs; - [ - { - package = coreutils; - command = "sync"; - } - { - package = hdparm; - command = "hdparm"; - } - { - package = nixos-rebuild; - command = "nixos-rebuild"; - } - { - package = nvme-cli; - command = "nvme"; - } - { - package = systemd; - command = "poweroff"; - } - { - package = systemd; - command = "reboot"; - } - { - package = systemd; - command = "shutdown"; - } - { - package = systemd; - command = "systemctl"; - } - { - package = util-linux; - command = "dmesg"; - } - ] - ); - } - ]; - }; - }; -} -- cgit v1.2.3