libkookie: formatting change of build script

main
Katharina Fey 3 years ago
parent 69f1d7da38
commit 20993c24b1
Signed by: kookie
GPG Key ID: 90734A9E619C8A6C
  1. 23
      infra/libkookie/build

@ -40,6 +40,13 @@ function switch {
"$OUT"/bin/switch-to-configuration switch "$OUT"/bin/switch-to-configuration switch
} }
## Build and switch to the new configuration (requires root)
function switch_reboot {
build "$@"
nix-env -p /nix/var/nix/profiles/system --set "$OUT"
"$OUT"/bin/switch-to-configuration boot
}
function vmimage { function vmimage {
RUN="$1"; shift RUN="$1"; shift
@ -62,9 +69,25 @@ function vmimage {
exit 0 exit 0
} }
function iso {
echo "Running iso command"
NIXPKGS_ALLOW_UNFREE=1 \
nix build -f '<nixpkgs/nixos>' system.build.isoImage \
-I nixos-config="$DIR/roots/iso.nix"
-I "nixpkgs=$DIR/nixpkgs/unstable" \
-I "nixpkgs-overlays=$DIR/overlays" \
-I "home-manager=$DIR/home-manager" \
-I "modules=$DIR/modules" \
-I "shells=$DIR/shells" \
-I "configuration=$DIR/configuration" \
--out-link "$OUT" "$@"
}
case "$1" in case "$1" in
-sb* | --switch-rb) shift; switch_reboot "$@" ;;
-s* | --switch*) shift; switch "$@" ;; -s* | --switch*) shift; switch "$@" ;;
-d* | --debug*) shift; debug "$@" ;; -d* | --debug*) shift; debug "$@" ;;
-i* | --iso*) shift; iso "$@" ;;
-vr*) shift; vmimage "1" "$@" ;; -vr*) shift; vmimage "1" "$@" ;;
-v*) shift; vmimage "0" "$@" ;; -v*) shift; vmimage "0" "$@" ;;
*) build "$@" ;; *) build "$@" ;;

Loading…
Cancel
Save