diff --git a/shell/default.nix b/shell/default.nix index 31e01c24..ba8f7e38 100644 --- a/shell/default.nix +++ b/shell/default.nix @@ -12,7 +12,7 @@ let flk = pkgs.writeShellScriptBin "flk" '' if [[ -z "$1" ]]; then - echo "Usage: $(basename "$0") [ iso | up | install {host} | {host} [switch|boot|test] ]" + echo "Usage: $(basename "$0") [ iso | up | install {host} | {host} [switch|boot|test] | home {host} {user} [switch] ]" elif [[ "$1" == "up" ]]; then mkdir -p $DEVSHELL_ROOT/up hostname=$(hostname) @@ -27,6 +27,11 @@ let nix build $DEVSHELL_ROOT#nixosConfigurations.niximg.${build}.isoImage "${"\${@:2}"}" elif [[ "$1" == "install" ]]; then sudo nixos-install --flake "$DEVSHELL_ROOT#$2" "${"\${@:3}"}" + elif [[ "$1" == "home" ]]; then + nix build ./#hmActivationPackages.$2.$3 + if [[ "$4" == "switch" ]]; then + ./result/activate && unlink result + fi else sudo nixos-rebuild --flake "$DEVSHELL_ROOT#$1" "${"\${@:2}"}" fi