new nixre.... that builds locally and can then copy and activate to/on another machine
This commit is contained in:
@@ -259,23 +259,6 @@
|
||||
ip -json addr show $1 | jq -r '.[] | .addr_info[] | select(.family == "inet") | .local'
|
||||
}
|
||||
|
||||
|
||||
# my nixos rebuild
|
||||
function nixre(){
|
||||
nix flake prefetch --refresh github:c2vi/nixos
|
||||
if [ "$1" == "boot" ]
|
||||
then
|
||||
nix build github:c2vi/nixos#nixosConfigurations.c2vi-main.config.system.build.toplevel --impure ''${@:2} \
|
||||
&& sudo ./result/bin/switch-to-configuration boot \
|
||||
&& rm ./result
|
||||
else
|
||||
nix build github:c2vi/nixos#nixosConfigurations.c2vi-main.config.system.build.toplevel --impure $@ \
|
||||
&& sudo ./result/bin/switch-to-configuration switch \
|
||||
&& rm ./result
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
#################### completions ####################
|
||||
complete -cf sudo
|
||||
complete -cf sd
|
||||
|
||||
Reference in New Issue
Block a user