replace sudo with run0

This commit is contained in:
Gerg-L 2024-10-05 15:27:45 -04:00
parent cd55b1bf6f
commit bb1f115635
Signed by: gerg-l
SSH key fingerprint: SHA256:FPYDHIkvMocr4wdmZXpgpJjsb2Tw6rASs2ISPbOb0KI

View file

@ -2,6 +2,7 @@
fetch-rs,
pkgs,
config,
lib,
}:
{
systemd.tmpfiles.rules = [ "d /tmp/neovim-page 0777 root root - -" ];
@ -18,8 +19,9 @@
MANPAGER = "page -t man";
};
shellAliases = {
#make sudo use aliases
sudo = "sudo ";
#make run0 use aliases
run0 = "run0 --background='' ";
s = "run0";
#paste link trick
pastebin = "curl -F 'clbin=<-' https://clbin.com";
termbin = "nc termbin.com 9999";
@ -42,14 +44,11 @@
};
interactiveShellInit = "fetch-rs";
};
security.sudo = {
enable = true;
execWheelOnly = true;
extraConfig = ''
Defaults timestamp_timeout=1
Defaults env_keep += "EDITOR VISUAL PAGER SYSTEMD_PAGERSECURE MANPAGER"
Defaults lecture = never
'';
#begone sudo
security = {
sudo.enable = lib.mkForce false;
wrappers.su.setuid = lib.mkForce false;
};
#zsh stuff
@ -115,7 +114,7 @@
format = ''
$cmd_duration$git_metrics$git_state$git_branch
$status$directory$character'';
right_format = "$sudo$nix_shell\${custom.direnv} $time";
right_format = "$nix_shell\${custom.direnv} $time";
continuation_prompt = " ";
character = {
success_symbol = "[\\$](#9ece6a bold)";
@ -139,10 +138,6 @@
format = "[$symbol$branch(:$remote_branch)]($style)";
style = "bold red";
};
sudo = {
format = "[ ](#7aa2f7)";
disabled = false;
};
cmd_duration = {
min_time = 5000;
style = "bold #9ece6a";