pkgs: diff-flake: rename 'host' to 'nixos'

To avoid mixing them up with Nix-Darwin and System Manager hosts.
This commit is contained in:
Bruno BELANYI 2025-11-17 12:42:03 +00:00
parent fae47faaff
commit e72a8b3f0f

View file

@ -32,7 +32,7 @@ add_home() {
FLAKE_OUTPUTS+=("homeConfigurations.\"$1\".activationPackage") FLAKE_OUTPUTS+=("homeConfigurations.\"$1\".activationPackage")
} }
add_host() { add_nixos() {
FLAKE_OUTPUTS+=("nixosConfigurations.\"$1\".config.system.build.toplevel") FLAKE_OUTPUTS+=("nixosConfigurations.\"$1\".config.system.build.toplevel")
} }
@ -70,7 +70,7 @@ usage() {
print_err " specify the name of a home-manager output configuration whose" print_err " specify the name of a home-manager output configuration whose"
print_err " closure should be diffed, can be used multiple times" print_err " closure should be diffed, can be used multiple times"
print_err " if no configuration name is given, defaults to current username" print_err " if no configuration name is given, defaults to current username"
print_err " --host [name]" print_err " --nixos [name]"
print_err " specify the name of a NixOS output configuration whose" print_err " specify the name of a NixOS output configuration whose"
print_err " closure should be diffed, can be used multiple times" print_err " closure should be diffed, can be used multiple times"
print_err " if no host name is given, defaults to current hostname" print_err " if no host name is given, defaults to current hostname"
@ -133,12 +133,12 @@ parse_args() {
add_home "$USER" add_home "$USER"
fi fi
;; ;;
--host) --nixos)
if [ $# -gt 0 ] && ! is_option "$1"; then if [ $# -gt 0 ] && ! is_option "$1"; then
add_host "$1" add_nixos "$1"
shift shift
else else
add_host "$(hostname)" add_nixos "$(hostname)"
fi fi
;; ;;
--shell) --shell)
@ -225,8 +225,8 @@ if [ "${#FLAKE_OUTPUTS[@]}" -eq 0 ]; then
for home in $(list_home_configurations); do for home in $(list_home_configurations); do
add_home "$home" add_home "$home"
done done
for host in $(list_nixos_configurations); do for nixos in $(list_nixos_configurations); do
add_host "$host" add_nixos "$nixos"
done done
for shell in $(list_dev_shells); do for shell in $(list_dev_shells); do
add_shell "$shell" add_shell "$shell"