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