From c03f88dbc366bd62aac0386d266c884223aabe9a Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Sat, 28 Sep 2024 10:27:12 +0100 Subject: [PATCH] Add clean-config script Removes all entries in ~/.config except a specified few --- system/home/scripts/default.nix | 1 + system/home/scripts/shell/clean-config.sh | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 system/home/scripts/shell/clean-config.sh diff --git a/system/home/scripts/default.nix b/system/home/scripts/default.nix index 84778911..c768a3ba 100644 --- a/system/home/scripts/default.nix +++ b/system/home/scripts/default.nix @@ -3,6 +3,7 @@ home.packages = [ (pkgs.writeShellScriptBin "esync" (builtins.readFile ./shell/esync.sh)) (pkgs.writeShellScriptBin "gsync" (builtins.readFile ./shell/gsync.sh)) + (pkgs.writeShellScriptBin "clean-config" (builtins.readFile ./shell/clean-config.sh)) (pkgs.writeShellScriptBin "rsync-local-config" (builtins.readFile ./shell/rsync-local-config.sh)) (pkgs.writeShellScriptBin "xdg-query-program" (builtins.readFile ./shell/xdg-query-program.sh)) ]; diff --git a/system/home/scripts/shell/clean-config.sh b/system/home/scripts/shell/clean-config.sh new file mode 100644 index 00000000..39b9c6ad --- /dev/null +++ b/system/home/scripts/shell/clean-config.sh @@ -0,0 +1,2 @@ +shopt -s extglob +rm -rf ~/.config/!(emacs|kdeconnect|protonmail|Signal|teams-for-linux|WebCord|whatsapp-for-linux)