From cd55b1bf6f857b85ce730e625d8ce65372a56379 Mon Sep 17 00:00:00 2001 From: Gerg-L Date: Sat, 5 Oct 2024 15:01:20 -0400 Subject: [PATCH 1/2] update nix --- flake.lock | 11 +++++------ flake.nix | 3 +-- modules/nix.nix | 6 +----- 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/flake.lock b/flake.lock index 277ea5f..6a897ec 100644 --- a/flake.lock +++ b/flake.lock @@ -573,16 +573,15 @@ "nixpkgs-regression": "nixpkgs-regression" }, "locked": { - "lastModified": 1727439651, - "narHash": "sha256-cMfDBWlWjCy+B6W68xJg5CIC4zghOi6KG1QXnflT6uY=", - "owner": "yannham", + "lastModified": 1728154788, + "narHash": "sha256-x7w/gBydlh5hljMuwXb/FgNNvSPc8p2SrnmVxARXddM=", + "owner": "Gerg-L", "repo": "nix", - "rev": "27b2fc43d4059cb9ad7cf75f492ea8cf9d41f697", + "rev": "83bb6f24352d54d42225286580cb69ab27fd3c99", "type": "github" }, "original": { - "owner": "yannham", - "ref": "27b2fc43d4059cb9ad7cf75f492ea8cf9d41f697", + "owner": "Gerg-L", "repo": "nix", "type": "github" } diff --git a/flake.nix b/flake.nix index 0a99280..83229fe 100644 --- a/flake.nix +++ b/flake.nix @@ -26,9 +26,8 @@ #repo = "nix"; #ref = "08deebddf26be28e5367983fdece18c484bbe410"; - owner = "yannham"; + owner = "Gerg-L"; repo = "nix"; - ref = "27b2fc43d4059cb9ad7cf75f492ea8cf9d41f697"; inputs.nixpkgs.follows = "stable"; }; nixos-generators = { diff --git a/modules/nix.nix b/modules/nix.nix index 96f2db1..992d515 100644 --- a/modules/nix.nix +++ b/modules/nix.nix @@ -26,11 +26,7 @@ # # Use nix directly from master # - package = nix.packages.default.overrideAttrs (old: { - meta = old.meta // { - mainProgram = "nix"; - }; - }); + package = nix.packages.default; # # Other nix settings # From bb1f115635b52b0e042cc0c2c70627b4f813e208 Mon Sep 17 00:00:00 2001 From: Gerg-L Date: Sat, 5 Oct 2024 15:27:45 -0400 Subject: [PATCH 2/2] replace sudo with run0 --- modules/shell.nix | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/modules/shell.nix b/modules/shell.nix index 63b42c2..f3950b8 100644 --- a/modules/shell.nix +++ b/modules/shell.nix @@ -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";