-
Notifications
You must be signed in to change notification settings - Fork 0
90 lines (81 loc) · 3.38 KB
/
linux.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: build-linux-outputs
on:
push:
branches:
- 'master'
paths:
- nixos/**
- home/**
- .github/workflows/linux.yml
- roles/**
- '!nixos/**.md'
- '!home/**.md'
- '!**.md'
workflow_dispatch:
schedule:
- cron: "0 0 * * Sat"
jobs:
build-linux-env:
name: Build Linux outputs
runs-on: [self-hosted, linux, x64]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixpkgs-unstable
extra_nix_config: |
extra-substituters = http://100.69.64.103/nixos
extra-trusted-public-keys = nixos:ZffGHlb0Ng3oXu8cLT9msyOB/datC4r+/K9nImONIec=
- name: Setup Nix Magic Cache
uses: DeterminateSystems/magic-nix-cache-action@main
- name: Build Linux outputs
run: |
sudo -s /bin/bash -- <<EOF
source /home/docker/.nix-profile/etc/profile.d/nix.sh
USER=root /home/docker/.nix-profile/bin/nix run nixpkgs#cachix -- use heywoodlh-helix
nix build "github:zhaofengli/attic#attic-client"
which attic &> /dev/null || nix profile install "github:zhaofengli/attic#attic-client"
attic push nixos ./result
/home/docker/.nix-profile/bin/nix run nixpkgs#nixos-rebuild -- build --flake .#nixos-desktop-intel
attic push nixos ./result
/home/docker/.nix-profile/bin/nix run nixpkgs#nixos-rebuild -- build --flake .#nixos-server-intel
attic push nixos ./result
/home/docker/.nix-profile/bin/nix build .#homeConfigurations.heywoodlh.activationPackage --impure
attic push nixos ./result
/home/docker/.nix-profile/bin/nix build .#homeConfigurations.heywoodlh-server.activationPackage --impure
attic push nixos ./result
EOF
build-linux-arm64-env:
name: Build Linux outputs
runs-on: [self-hosted, linux, arm64]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixpkgs-unstable
extra_nix_config: |
extra-substituters = http://100.69.64.103/nixos
extra-trusted-public-keys = nixos:ZffGHlb0Ng3oXu8cLT9msyOB/datC4r+/K9nImONIec=
- name: Setup Nix Magic Cache
uses: DeterminateSystems/magic-nix-cache-action@main
- name: Build Linux outputs
run: |
sudo -s /bin/bash -- <<EOF
source /home/docker/.nix-profile/etc/profile.d/nix.sh
USER=root /home/docker/.nix-profile/bin/nix run nixpkgs#cachix -- use heywoodlh-helix
nix build "github:zhaofengli/attic#attic-client"
which attic &> /dev/null || nix profile install "github:zhaofengli/attic#attic-client"
attic push nixos ./result
/home/docker/.nix-profile/bin/nix run nixpkgs#nixos-rebuild -- build --flake .#nixos-arm64-test
attic push nixos ./result
/home/docker/.nix-profile/bin/nix run nixpkgs#nixos-rebuild -- build --flake .#nixos-mac-mini
attic push nixos ./result
/home/docker/.nix-profile/bin/nix build .#homeConfigurations.heywoodlh.activationPackage --impure
attic push nixos ./result
/home/docker/.nix-profile/bin/nix build .#homeConfigurations.heywoodlh-server.activationPackage --impure
attic push nixos ./result
EOF