-
Notifications
You must be signed in to change notification settings - Fork 11
37 lines (34 loc) · 1.16 KB
/
home-build.yaml
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
name: Build home using nix
on:
workflow_dispatch:
pull_request:
push:
branches: [ "*" ]
concurrency:
group: home-build-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Nix build
runs-on: ${{ matrix.job.os }}
strategy:
fail-fast: false
matrix:
job: [ { os: ubuntu-latest } ] # { os: macos-latest } takes ages to build
steps:
- uses: actions/checkout@v2
- name: "Get nixpkgs"
id: pinned_nixpkgs
run: echo "::set-output name=url::https://github.com/NixOS/nixpkgs/archive/master.tar.gz"
- name: "Install Nix"
uses: cachix/install-nix-action@v13
with:
nix_path: "nixpkgs=${{ steps.pinned_nixpkgs.outputs.url }}"
- name: "Build home"
run: |
export NIX_PATH=$HOME/.nix-defexpr/channels${NIX_PATH:+:}$NIX_PATH
mkdir -p ~/.config/nix
echo 'experimental-features = nix-command flakes' > ~/.config/nix/nix.conf
cd home-manager/.config/home-manager/
sed -i 's|path:/home/meain/dev/src/nur-packages|github:meain/nur-packages|' flake.nix
nix build .#homeConfigurations.meain.activationPackage