-
Notifications
You must be signed in to change notification settings - Fork 0
118 lines (101 loc) · 3.39 KB
/
nixos.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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
name: NixOS
concurrency: nixos
on:
pull_request:
push:
branches:
- main
paths-ignore:
- "README.md"
- "NOTES.md"
- ".gitignore"
jobs:
build-boar:
runs-on: ubuntu-latest
steps:
- name: "Create Dir for Mounting moar Disk Space ❄"
run: |
sudo mkdir /nix
- name: "Maximize Disk Space"
run: |
sudo rm -rf $AGENT_TOOLSDIRECTORY
sudo rm -rf /usr/local/.ghcup
sudo rm -rf /usr/local/share/powershell
sudo rm -rf /usr/local/share/chromium
sudo rm -rf /usr/local/lib/node_modules
sudo rm -rf /usr/local/lib/heroku
sudo rm -rf /var/lib/docker/overlay2
sudo rm -rf /home/linuxbrew
sudo rm -rf /home/runner/.rustup
- name: "Maximize Disk Space 😈"
uses: easimon/maximize-build-space@v8
with:
root-reserve-mb: 8192
swap-size-mb: 1024
build-mount-path: /nix
remove-dotnet: "true"
remove-android: "true"
remove-haskell: "true"
remove-codeql: "true"
remove-docker-images: "true"
- uses: actions/checkout@v4
- name: "Install Nix ❄️"
uses: cachix/install-nix-action@v27
with:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- name: "Install Cachix ❄️"
uses: cachix/cachix-action@v15
with:
name: workflow-nixos-config
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
- name: "Build NixOS config ❄️"
run: |
nix build .#nixosConfigurations.boar.config.system.build.toplevel --override-input secrets nixpkgs
build-flexbox:
runs-on: ubuntu-latest
needs: [build-boar]
steps:
- name: "Create Dir for Mounting moar Disk Space ❄"
run: |
sudo mkdir /nix
- name: "Maximize Disk Space"
run: |
sudo rm -rf $AGENT_TOOLSDIRECTORY
sudo rm -rf /usr/local/.ghcup
sudo rm -rf /usr/local/share/powershell
sudo rm -rf /usr/local/share/chromium
sudo rm -rf /usr/local/lib/node_modules
sudo rm -rf /usr/local/lib/heroku
sudo rm -rf /var/lib/docker/overlay2
sudo rm -rf /home/linuxbrew
sudo rm -rf /home/runner/.rustup
- name: "Maximize Disk Space 😈"
uses: easimon/maximize-build-space@v8
with:
root-reserve-mb: 24432
swap-size-mb: 512
build-mount-path: /nix
remove-dotnet: "true"
remove-android: "true"
remove-haskell: "true"
remove-codeql: "true"
remove-docker-images: "true"
- uses: actions/checkout@v4
- name: "Install Nix ❄️"
uses: cachix/install-nix-action@v27
with:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- name: "Install Cachix ❄️"
uses: cachix/cachix-action@v15
with:
name: workflow-nixos-config
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
- name: "Build NixOS config ❄️"
run: |
nix build .#nixosConfigurations.flexbox.config.system.build.toplevel --override-input secrets nixpkgs