From a02a00d437183da0eec512a544691d302cdc7a4e Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Tue, 1 Aug 2023 13:13:20 +0200 Subject: [PATCH] [nix] Add a shell function for updating Nix --- nix/hosts/alymac/zsh.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/nix/hosts/alymac/zsh.nix b/nix/hosts/alymac/zsh.nix index b60dc27..0506425 100644 --- a/nix/hosts/alymac/zsh.nix +++ b/nix/hosts/alymac/zsh.nix @@ -13,6 +13,14 @@ export PATH="$PATH:$HOME/.npm-packages/bin" export FRENYARD_SCALE=2.40 export RETHINK_API="https://rethink.alyxia.dev" + + function violent-update() { + # + sudo -v; while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & + cd "$HOME/.dotfiles/nix"; + sudo nix-channel --update && nix-channel --update; + sudo nix-env -u; + } ''; }; }