Skip to content

Commit

Permalink
feat: sudo-rs autism
Browse files Browse the repository at this point in the history
  • Loading branch information
sioodmy committed Nov 10, 2023
1 parent 62e44cb commit 819892c
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 3 deletions.
30 changes: 28 additions & 2 deletions system/core/schizo.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
config,
inputs,
pkgs,
lib,
...
Expand Down Expand Up @@ -102,7 +102,33 @@
};
};

sudo.enable = true;
sudo.enable = lib.mkForce false;
sudo-rs = {
enable = true;
extraRules = [
{
commands = [
{
command = "/run/current-system/sw/bin/poweroff";
options = ["NOPASSWD"];
}
{
command = "/run/current-system/sw/bin/reboot";
options = ["NOPASSWD"];
}
{
command = "/run/current-system/sw/bin/nixos-rebuild";
options = ["NOPASSWD"];
}
{
command = "/run/current-system/sw/bin/nh";
options = ["NOPASSWD"];
}
];
groups = ["wheel"];
}
];
};
};

boot.kernel.sysctl = {
Expand Down
1 change: 0 additions & 1 deletion system/core/system.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
btrfs-progs
appimage-run
starship # having starship here means pkgs.startship will be stored during build and not during promptInit
(writeScriptBin "sudo" ''exec doas "$@"'')
];

time = {
Expand Down

0 comments on commit 819892c

Please sign in to comment.