{ config, pkgs, lib, vars, ... }: let # Flake attribute names are now - (e.g. proxmox-docker) # and no longer match networking.hostName, since a host's hostname stays # fixed while the platform backing it can change. Each nixosConfiguration # stamps its own active target name into /etc/flake-target at build time. mySwitchCmd = '' sudo nixos-rebuild switch \ --no-write-lock-file \ --refresh \ --flake git+https://${vars.lanDomain}/beatzaplenty/nixos.git#$(cat /etc/flake-target) ''; myTestCmd = '' sudo nixos-rebuild test \ --no-write-lock-file \ --refresh \ --flake git+https://${vars.lanDomain}/beatzaplenty/nixos.git#$(cat /etc/flake-target) ''; in { programs.bash = { enable = true; shellAliases = { "Switch-nix" = mySwitchCmd; "Test-nix" = myTestCmd; }; }; }