build: handle nix-darwin NIX_PATH goofiness
This commit is contained in:
parent
e1abe82454
commit
89484eceec
2 changed files with 20 additions and 3 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -6,3 +6,6 @@ home/secrets/fonts.tgz
|
||||||
|
|
||||||
# Generated by nix-pre-commit-hooks
|
# Generated by nix-pre-commit-hooks
|
||||||
/.pre-commit-config.yaml
|
/.pre-commit-config.yaml
|
||||||
|
|
||||||
|
# generated nix files
|
||||||
|
/result
|
||||||
|
|
20
justfile
20
justfile
|
@ -6,7 +6,14 @@ default:
|
||||||
# check flake syntax {{{
|
# check flake syntax {{{
|
||||||
[macos]
|
[macos]
|
||||||
check:
|
check:
|
||||||
darwin-rebuild check --flake .
|
#!/usr/bin/env bash
|
||||||
|
set -euxo pipefail
|
||||||
|
if [[ -x "./result/sw/bin/darwin-rebuild" ]]; then
|
||||||
|
./result/sw/bin/darwin-rebuild check --flake .
|
||||||
|
else
|
||||||
|
nix build .\#darwinConfigurations.${HOST}.system
|
||||||
|
./result/sw/bin/darwin-rebuild check --flake .
|
||||||
|
fi
|
||||||
|
|
||||||
[linux]
|
[linux]
|
||||||
check:
|
check:
|
||||||
|
@ -16,7 +23,14 @@ check:
|
||||||
# build {{{
|
# build {{{
|
||||||
[macos]
|
[macos]
|
||||||
switch: secret-stage && secret-unstage
|
switch: secret-stage && secret-unstage
|
||||||
darwin-rebuild switch --flake .
|
#!/usr/bin/env bash
|
||||||
|
set -euxo pipefail
|
||||||
|
if [[ -x "./result/sw/bin/darwin-rebuild" ]]; then
|
||||||
|
./result/sw/bin/darwin-rebuild switch --flake .
|
||||||
|
else
|
||||||
|
nix build .\#darwinConfigurations.${HOST}.system
|
||||||
|
./result/sw/bin/darwin-rebuild switch --flake .
|
||||||
|
fi
|
||||||
|
|
||||||
[linux]
|
[linux]
|
||||||
switch: secret-stage && secret-unstage
|
switch: secret-stage && secret-unstage
|
||||||
|
@ -36,7 +50,7 @@ fontdir := if os() == "macos" {"$HOME/Library/Fonts"} else {"${XDG_DATA_HOME:-$H
|
||||||
|
|
||||||
install-fonts:
|
install-fonts:
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -euo pipefail
|
set -euxo pipefail
|
||||||
mkdir -p "{{fontdir}}"
|
mkdir -p "{{fontdir}}"
|
||||||
gpg --decrypt home/secrets/fonts.tgz.gpg | tar -xz -C "{{fontdir}}" --strip-components=1
|
gpg --decrypt home/secrets/fonts.tgz.gpg | tar -xz -C "{{fontdir}}" --strip-components=1
|
||||||
# }}}
|
# }}}
|
||||||
|
|
Loading…
Reference in a new issue