2025-05-09 01:53:14 +02:00
|
|
|
{
|
|
|
|
|
pkgs,
|
|
|
|
|
lib,
|
|
|
|
|
username,
|
|
|
|
|
...
|
|
|
|
|
}:
|
2023-11-05 17:56:55 +01:00
|
|
|
{
|
2024-06-21 09:37:52 +02:00
|
|
|
security = {
|
|
|
|
|
rtkit.enable = true;
|
|
|
|
|
pam.services.swaylock = { };
|
2025-05-09 01:53:14 +02:00
|
|
|
|
|
|
|
|
sudo = {
|
|
|
|
|
enable = true;
|
|
|
|
|
extraRules = [
|
|
|
|
|
{
|
|
|
|
|
groups = [ "wheel" ];
|
|
|
|
|
commands = [
|
|
|
|
|
{
|
|
|
|
|
command = "/etc/profiles/per-user/liv/bin/systemctl";
|
|
|
|
|
options = [ "NOPASSWD" ];
|
2025-05-09 02:36:42 +02:00
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
command = "/home/liv/.local/src/framework-system/target/debug/framework_tool";
|
|
|
|
|
options = [ "NOPASSWD" ];
|
2025-05-09 01:53:14 +02:00
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
package = (pkgs.sudo.override { withInsults = true; }).overrideAttrs (old: {
|
|
|
|
|
postPatch =
|
|
|
|
|
(old.postPatch or "")
|
|
|
|
|
+ ''
|
|
|
|
|
substituteInPlace plugins/sudoers/logging.c \
|
|
|
|
|
--replace "This incident has been reported to the administrator." "o-oops, ${username} is in trouble" \
|
|
|
|
|
--replace "incorrect password attempts" "nuu silly, try again ~ >.< ~" \
|
|
|
|
|
--replace "incorrect password attempt" "nuu silly, try again ~ >.< ~" \
|
|
|
|
|
--replace "authentication failure" "oepsie woepsie alles is stukkie wukkie :3" \
|
|
|
|
|
--replace "a password is required" "no password for me? 🥺\n"
|
|
|
|
|
'';
|
|
|
|
|
configureFlags =
|
|
|
|
|
(builtins.filter (x: !(lib.strings.hasPrefix x "--with-passprompt=")) old.configureFlags)
|
|
|
|
|
++ [
|
|
|
|
|
"--with-badpass-message=try again silly"
|
|
|
|
|
"--with-passprompt=is password for me? 🥺"
|
|
|
|
|
];
|
|
|
|
|
});
|
|
|
|
|
};
|
2024-06-21 09:37:52 +02:00
|
|
|
};
|
2023-11-05 11:40:44 +01:00
|
|
|
}
|