From a150b793b047d85ea86e88df28f0a21ddf37efb5 Mon Sep 17 00:00:00 2001 From: Chris Toph Date: Mon, 14 Apr 2025 13:47:01 -0400 Subject: [PATCH] Updates package management and protects rm - Removes redundant packages from core settings - Adds trash CLI and a safety wrapper for rm - Reassigns curl to system packages and omits plocate --- home/toph/common/core/default.nix | 6 ++---- home/toph/common/core/fish/init.fish | 7 +++++++ hosts/common/core/default.nix | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/home/toph/common/core/default.nix b/home/toph/common/core/default.nix index 61630ae..6ee2dd7 100644 --- a/home/toph/common/core/default.nix +++ b/home/toph/common/core/default.nix @@ -69,16 +69,14 @@ # Packages that don't have custom configs go here btop # resource monitor coreutils # basic gnu utils - curl - dua # disk usage analyzer dust # disk usage eza # ls replacement - jq + jq # json parser p7zip # compression & encryption pre-commit # git hooks + trashy # trash cli unrar # rar extraction unzip # zip extraction - wget # downloader xdg-user-dirs xdg-utils # provide cli tools such as `xdg-mime` and `xdg-open` zip # zip compression diff --git a/home/toph/common/core/fish/init.fish b/home/toph/common/core/fish/init.fish index 1e11045..1a8274f 100644 --- a/home/toph/common/core/fish/init.fish +++ b/home/toph/common/core/fish/init.fish @@ -26,6 +26,13 @@ function rebuild end end +# Discourage using rm command +function rm + if test (count $argv) -gt 0 + echo "Error: 'rm' is protected. Please use 'trashy' command instead." + end +end + # SSH function, just for convenience since I use it a lot function s set user (whoami) diff --git a/hosts/common/core/default.nix b/hosts/common/core/default.nix index dc248e5..884fa3a 100644 --- a/hosts/common/core/default.nix +++ b/hosts/common/core/default.nix @@ -23,9 +23,9 @@ in # System-wide packages, in case we log in as root environment.systemPackages = with pkgs; [ + curl micro openssh - plocate ranger sshfs wget