Commit b9e0398
Changed files (1)
modules
core
modules/core/sudo.nix
@@ -0,0 +1,25 @@
+{
+ den.aspects.core.sudo = {
+ nixos = {pkgs, ...}: {
+ security.sudo = {
+ enable = true;
+ package = pkgs.sudo.override {withInsults = true;};
+ extraRules = [
+ {
+ commands =
+ map
+ (command: {
+ command = "/run/current-system/sw/bin/${command}";
+ options = ["NOPASSWD"];
+ })
+ [
+ "poweroff"
+ "reboot"
+ ];
+ groups = ["wheel"];
+ }
+ ];
+ };
+ };
+ };
+}