flk script: add home-manager only configuration support
This commit is contained in:
parent
88eecddab5
commit
bbcf4123b2
1 changed files with 6 additions and 1 deletions
|
@ -12,7 +12,7 @@ let
|
||||||
|
|
||||||
flk = pkgs.writeShellScriptBin "flk" ''
|
flk = pkgs.writeShellScriptBin "flk" ''
|
||||||
if [[ -z "$1" ]]; then
|
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
|
elif [[ "$1" == "up" ]]; then
|
||||||
mkdir -p $DEVSHELL_ROOT/up
|
mkdir -p $DEVSHELL_ROOT/up
|
||||||
hostname=$(hostname)
|
hostname=$(hostname)
|
||||||
|
@ -27,6 +27,11 @@ let
|
||||||
nix build $DEVSHELL_ROOT#nixosConfigurations.niximg.${build}.isoImage "${"\${@:2}"}"
|
nix build $DEVSHELL_ROOT#nixosConfigurations.niximg.${build}.isoImage "${"\${@:2}"}"
|
||||||
elif [[ "$1" == "install" ]]; then
|
elif [[ "$1" == "install" ]]; then
|
||||||
sudo nixos-install --flake "$DEVSHELL_ROOT#$2" "${"\${@:3}"}"
|
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
|
else
|
||||||
sudo nixos-rebuild --flake "$DEVSHELL_ROOT#$1" "${"\${@:2}"}"
|
sudo nixos-rebuild --flake "$DEVSHELL_ROOT#$1" "${"\${@:2}"}"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue