-
Notifications
You must be signed in to change notification settings - Fork 111
38 lines (32 loc) · 975 Bytes
/
test-nix-flake.yml
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
name: Test Nix Flake
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
nix-flake-build:
runs-on: ubuntu-latest
name: Build Nix Flake
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install Nix
uses: cachix/install-nix-action@v13
# Initialize a new Nix flake
- name: Initialize Nix Flake
run: |
mkdir -p my-config && cd my-config
nix flake --extra-experimental-features 'nix-command flakes' init -t github:dustinlyons/nixos-config#starter
# Apply CI user info
- name: Apply CI User Info
run: |
cd /home/runner/work/nixos-config/nixos-config/my-config
/home/runner/work/nixos-config/nixos-config/bin/apply-ci
# Build the Nix Flake
- name: Build Nix Flake
run: |
cd /home/runner/work/nixos-config/nixos-config/my-config
nix build --extra-experimental-features 'nix-command flakes' .#nixos