Files
invoiceninja-nixos/justfile
T
awkawbandClaude Sonnet 5 4e544f6e46 flake: add cachix binary cache
Adds nixConfig substituter/key for the invoiceninja-nixos cachix cache,
a `just push-cache` target to build and push the package and automated
test to it, and exposes the UI frontend build as a passthru output
(`invoiceninja.ui`) so it can be built and pushed independently.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-22 15:59:29 -04:00

47 lines
1.2 KiB
Makefile

set quiet := true
# Passed to QEMU in boot-vm
export QEMU_KERNEL_PARAMS := "console=ttyS0"
export QEMU_NET_OPTS := "hostfwd=tcp::8080-:80"
export QEMU_OPTS := "-nographic"
[private]
_default:
just --list
[doc('Clean build artifacts and shutdown running virtual machines')]
[group('maintenance')]
clean:
#!/usr/bin/env bash
rm result > /dev/null 2>&1
rm nixos.qcow2 > /dev/null 2>&1
pkill qemu
exit 0
[doc('Build virtual machine for testing (proxy: nginx or caddy)')]
[group('main')]
build-vm proxy="nginx": clean
nom build ".#nixosConfigurations.test-{{proxy}}.config.system.build.vm"
[doc('Run virtual machine in current terminal')]
[group('main')]
boot-vm:
#!/usr/bin/env bash
[ -x result/bin/run-nixos-vm ] && \
./result/bin/run-nixos-vm
reset
[doc('Run the automated NixOS VM test')]
[group('main')]
test:
nix flake check -L
[doc('Build the package and automated test, then push results to the invoiceninja-nixos cachix cache')]
[group('maintenance')]
push-cache:
nix build --print-out-paths --no-link \
".#invoiceninja" \
".#checks.x86_64-linux.invoiceninja" \
| cachix push invoiceninja-nixos