1
1
mirror of https://github.com/divnix/digga.git synced 2024-12-24 00:21:47 +03:00

flk: add general build command, replace iso/doi

This commit is contained in:
Pacman99 2021-06-10 14:45:04 -07:00 committed by Parthiv Seetharaman
parent 00d056f87e
commit 65ecc2cbf0

View File

@ -19,8 +19,7 @@ usage () {
"up" "Generate $DEVSHELL_ROOT/hosts/up-$HOSTNAME.nix" \ "up" "Generate $DEVSHELL_ROOT/hosts/up-$HOSTNAME.nix" \
"update [INPUT]" "Update and commit the lock file, or specific input" \ "update [INPUT]" "Update and commit the lock file, or specific input" \
"get (core|community) [DEST]" "Copy the desired template to DEST" \ "get (core|community) [DEST]" "Copy the desired template to DEST" \
"doi HOST" "Generate DigitalOcean image of HOST" \ "build HOST BUILD" "Build a variant of your configuration from system.build"
"iso HOST" "Generate an ISO image of HOST" \
"vm HOST" "Generate a vm for HOST" \ "vm HOST" "Generate a vm for HOST" \
"vm run HOST" "run a one-shot vm for HOST" \ "vm run HOST" "run a one-shot vm for HOST" \
"install HOST [ARGS]" "Shortcut for nixos-install" \ "install HOST [ARGS]" "Shortcut for nixos-install" \
@ -75,20 +74,12 @@ case "$1" in
fi fi
;; ;;
"doi") "build")
nix build \ nix build \
"$DEVSHELL_ROOT#nixosConfigurations.$2.config.system.build.digitalOcean" \ "$DEVSHELL_ROOT#nixosConfigurations.$2.config.system.build.$3" \
-o \ -o \
"$DEVSHELL_ROOT/doi/$2.qcow2" \ "$DEVSHELL_ROOT/$3/$2.$3" \
"${@:3}" "${@:4}"
;;
"iso")
nix build \
"$DEVSHELL_ROOT#nixosConfigurations.$2.config.system.build.iso" \
-o \
"$DEVSHELL_ROOT/iso/$2.iso" \
"${@:3}"
;; ;;
"vm") "vm")