-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjustfile
27 lines (23 loc) · 1.08 KB
/
justfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
help:
just --list
# We don't do `nix-env --set --profile ..` here since we aren't using nix
# profiles to manage the system.
#
# run switch-to-configuration for a nixos system
nixos *ARGS:
nix shell --extra-experimental-features "nix-command flakes" --print-build-logs {{ARGS}} \
"{{justfile_directory()}}#nixosConfigurations.$(hostname).config.system.build.toplevel" \
--command sudo switch-to-configuration test
new-machine name:
mkdir -p {{justfile_directory()}}/nixos-configurations/{{name}}
touch {{justfile_directory()}}/nixos-configurations/{{name}}/default.nix
touch {{justfile_directory()}}/nixos-configurations/{{name}}/age.pubkey
touch {{justfile_directory()}}/flake.nix # trigger direnv to get new .sops.yaml
direnv allow
git_is_clean:
git diff HEAD --quiet
release bump_type="patch": git_is_clean
cat {{justfile_directory()}}/.version | xargs semver bump {{bump_type}} | tee {{justfile_directory()}}/.version
git add {{justfile_directory()}}/.version
git commit -m "Release $(cat {{justfile_directory()}}/.version)"
git tag "v$(cat {{justfile_directory()}}/.version)"