Nix : Allow to pass extra args.
This commit is contained in:
parent
4fed6a765e
commit
73fcd3a32e
|
@ -7,7 +7,7 @@ function nixos_rebuild() {
|
||||||
local target="${1}"
|
local target="${1}"
|
||||||
[[ "${target}" = "" ]] && target="${HOSTNAME}"
|
[[ "${target}" = "" ]] && target="${HOSTNAME}"
|
||||||
|
|
||||||
nixos-rebuild boot --flake "${_nix_system_config}#${target}" --refresh
|
nixos-rebuild boot --flake "${_nix_system_config}#${target}" --refresh ${@}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Rebuild and switch system.
|
# Rebuild and switch system.
|
||||||
|
@ -17,7 +17,7 @@ function nixos_switch() {
|
||||||
local target="${1}"
|
local target="${1}"
|
||||||
[[ "${target}" = "" ]] && target="${HOSTNAME}"
|
[[ "${target}" = "" ]] && target="${HOSTNAME}"
|
||||||
|
|
||||||
nixos-rebuild switch --flake "${_nix_system_config}#${target}" --refresh
|
nixos-rebuild switch --flake "${_nix_system_config}#${target}" --refresh ${@}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Spawn shell with specified nix environment.
|
# Spawn shell with specified nix environment.
|
||||||
|
@ -59,7 +59,7 @@ alias tmpshell="nix_tmpshell"
|
||||||
|
|
||||||
# Build live image.
|
# Build live image.
|
||||||
function nixos_live() {
|
function nixos_live() {
|
||||||
nix build "${_nix_system_config}#nixosConfigurations.live.config.system.build.isoImage" --refresh
|
nix build "${_nix_system_config}#nixosConfigurations.live.config.system.build.isoImage" --refresh ${@}
|
||||||
}
|
}
|
||||||
|
|
||||||
# List nixos generations.
|
# List nixos generations.
|
||||||
|
@ -69,7 +69,7 @@ function nixos_generations() {
|
||||||
|
|
||||||
# Switch nix-on-droid.
|
# Switch nix-on-droid.
|
||||||
function nixdroid_switch() {
|
function nixdroid_switch() {
|
||||||
nix-on-droid switch --flake "${_nix_system_config}"
|
nix-on-droid switch --flake "${_nix_system_config}" ${@}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Autocomplete with available hosts.
|
# Autocomplete with available hosts.
|
||||||
|
|
Loading…
Reference in a new issue