-
Notifications
You must be signed in to change notification settings - Fork 35
/
justfile
54 lines (46 loc) · 1.83 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
_default:
just --list
check:
nix flake check
build profile:
#!/usr/bin/env bash
set -euxo pipefail
nix build --json --no-link --print-build-logs "{{ profile }}" \
| jq -r ".[0].outputs.out"
build-template template temp_dir="$(mktemp -d)":
#!/usr/bin/env bash
set -euxo pipefail
OUTPUT_DIR=$(just build "$PWD#example-{{ template }}")
TEMP_DIR={{ temp_dir }}
cp --no-preserve=mode -r $OUTPUT_DIR/* $TEMP_DIR/.
echo $TEMP_DIR
build-darwin system="x86_64" temp_dir="$(mktemp -d)":
#!/usr/bin/env bash
set -euxo pipefail
TEMP_DIR=$(just build-template "darwin" "{{ temp_dir }}")
ls -alh $TEMP_DIR
just build "$TEMP_DIR#darwinConfigurations.{{ system }}.config.system.build.toplevel"
build-home-manager system="x86_64-linux" temp_dir="$(mktemp -d)":
#!/usr/bin/env bash
set -euxo pipefail
TEMP_DIR=$(just build-template "home-manager" "{{ temp_dir }}")
ls -alh $TEMP_DIR
just build "$TEMP_DIR#homeConfigurations.{{ system }}.activationPackage"
build-language language profile="default" temp_dir="$(mktemp -d)":
#!/usr/bin/env bash
set -euxo pipefail
TEMP_DIR=$(just build-template "{{ language }}" "{{ temp_dir }}")
ls -alh $TEMP_DIR
just build "$TEMP_DIR"
build-nixos-desktop system="x86_64" desktop="gnome" temp_dir="$(mktemp -d)":
#!/usr/bin/env bash
set -euxo pipefail
TEMP_DIR=$(just build-template "nixos-desktop-{{ desktop }}" "{{ temp_dir }}")
ls -alh $TEMP_DIR
just build "$TEMP_DIR#nixosConfigurations.{{ system }}.config.system.build.toplevel"
build-nixos-minimal system="x86_64" temp_dir="$(mktemp -d)":
#!/usr/bin/env bash
set -euxo pipefail
TEMP_DIR=$(just build-template "nixos-minimal" "{{ temp_dir }}")
ls -alh $TEMP_DIR
just build "$TEMP_DIR#nixosConfigurations.{{ system }}.config.system.build.toplevel"