-
Notifications
You must be signed in to change notification settings - Fork 33
55 lines (47 loc) · 1.5 KB
/
nix-setup.yml
File metadata and controls
55 lines (47 loc) · 1.5 KB
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
55
# This is a re-usable workflow that is used by .github/workflows/check.yml to handle necessary setup
# before running Nix commands. E.g. this will install Nix and set up Magic Nix Cache
name: "Nix Setup"
on:
workflow_call:
inputs:
command:
required: false
type: string
platform:
default: "ubuntu"
required: false
type: string
secrets:
GH_TOKEN:
required: true
jobs:
nix:
runs-on: "${{ inputs.platform }}-latest"
steps:
- name: "Set default git branch (to reduce log spam)"
run: git config --global init.defaultBranch main
- name: "Checkout"
uses: actions/checkout@v6
with:
token: "${{ secrets.GH_TOKEN }}"
- name: "Set up QEMU support"
uses: docker/setup-qemu-action@v4
with:
platforms: arm64
- name: "Install nix"
uses: cachix/install-nix-action@master
with:
install_url: https://nixos.org/nix/install
extra_nix_config: |
experimental-features = nix-command flakes fetch-tree
allow-import-from-derivation = false
extra-platforms = aarch64-linux
- name: "Cachix Setup"
uses: cachix/cachix-action@v16
with:
authToken: ${{ secrets.CACHIX_TOKEN }}
name: hyprland-community
- name: "Nix Magic Cache"
uses: DeterminateSystems/magic-nix-cache-action@main
- name: "Run Input: ${{ inputs.command }}"
run: "${{ inputs.command }}"