Uses fish argparse for update-sys fn.
This commit is contained in:
parent
47cbe29f37
commit
9eef6693a5
|
@ -241,8 +241,21 @@ in
|
||||||
set -l last_argv $argv
|
set -l last_argv $argv
|
||||||
echo \"$argv[1]\" Command Not Found
|
echo \"$argv[1]\" Command Not Found
|
||||||
'';
|
'';
|
||||||
update-hm = "home-manager switch -L --flake nixconf &| nom";
|
update-sys = ''
|
||||||
update-sys = "sudo nixos-rebuild switch --log-format internal-json -v --flake nixconf &| nom --json";
|
argparse -i 'f/flake=' -- $argv
|
||||||
|
set -f mode switch
|
||||||
|
if set -q argv[1]
|
||||||
|
set -f mode $argv[1]
|
||||||
|
end
|
||||||
|
|
||||||
|
set -f flake nixconf
|
||||||
|
if set -q _flag_f
|
||||||
|
set -f flake $_flag_f
|
||||||
|
end
|
||||||
|
|
||||||
|
sudo echo -n # Make sure sudo has already prompted for password.
|
||||||
|
sudo nixos-rebuild $mode --log-format internal-json -v --flake $flake &| nom --json
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
interactiveShellInit = ''
|
interactiveShellInit = ''
|
||||||
abbr --position anywhere -a !! -f last_cmd
|
abbr --position anywhere -a !! -f last_cmd
|
||||||
|
|
Loading…
Reference in a new issue