blob: edebd3e0bbb4c826fff8e3f34f1faa60c32858af (
plain) (
tree)
|
|
# default recipe to display help information
default:
@just --list
# update the flakes
[group('nix')]
update-deps:
nix flake update --commit-lock-file
# check the flake for errors
[group('nix')]
check:
nix flake check
# format the repository
[group('nix')]
fmt:
nix fmt
# build the nix-darwin system configuration without switching to it
[group('darwin')]
build:
@echo "building nix-darwin config..."
darwin-rebuild build --flake .
# switch the nix-darwin system configuration
[group('darwin')]
switch:
@echo "switching to new config..."
sudo darwin-rebuild switch --flake .
# build the iso to bootstrap a new machine
[group('linux')]
build-iso:
@echo "building an ISO for nixos..."
nix build .#nixosConfigurations.iso.config.system.build.isoImage
# provision a new machine with nixos-anywhere
[group('linux')]
deploy-nixos flake ip:
./tools/deploy-nixos.py --flake {{flake}} --target-ip {{ip}}
# rebuild the nixos configuration for a host
[group('linux')]
rbuild hostname:
@echo "building {{hostname}} nixos config..."
nixos-rebuild build --keep-going --flake ".#{{hostname}}" --target-host {{hostname}} --fast --use-remote-sudo --use-substitutes
# apply the nixos configuration for a host
[group('linux')]
rswitch hostname:
@echo "switching {{hostname}} to new config..."
nixos-rebuild switch --keep-going --flake ".#{{hostname}}" --target-host {{hostname}} --fast --use-remote-sudo --use-substitutes
# generate a new OIDC secret
[group('secrets')]
oidc-secret:
@echo "generate a new OIDC secret..."
nix run nixpkgs#authelia -- crypto hash generate pbkdf2 --variant sha512 --random --random.length 72 --random.charset rfc3986
|