My nixos configuration
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #317 from NobbZ/ci/update-nix

ci: bump nix version across all stages

authored by nobbz.dev and committed by

GitHub 15d0403e 91f3da5b

+161 -161
+161 -161
.github/workflows/flake-update.yml
··· 2 2 3 3 on: 4 4 schedule: 5 - - cron: '0 2 * * *' 5 + - cron: "0 2 * * *" 6 6 workflow_dispatch: {} 7 7 8 8 jobs: ··· 12 12 packages: ${{ steps.gen_packages.outputs.packages }} 13 13 checks: ${{ steps.gen_checks.outputs.checks }} 14 14 steps: 15 - - name: Clone repository 16 - uses: actions/checkout@v3 17 - with: 18 - token: '${{ secrets.GITHUB_TOKEN }}' 19 - - name: Install nix 20 - uses: cachix/install-nix-action@v18 21 - with: 22 - extra_nix_config: | 23 - auto-optimise-store = true 24 - access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} 25 - experimental-features = nix-command flakes 26 - substituters = https://cache.nixos.org/ https://nix-community.cachix.org 27 - trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= 28 - install_url: https://releases.nixos.org/nix/nix-2.7.0/install 29 - - name: Generate flake.json 30 - run: | 31 - nix flake show --json > flake.json 32 - - id: gen_packages 33 - run: | 34 - packages=$(jq -c '.packages."x86_64-linux" | keys' < flake.json) 35 - printf "::set-output name=packages::%s" "$packages" 36 - - id: gen_checks 37 - run: | 38 - checks=$(jq -c '.checks."x86_64-linux" | keys' < flake.json) 39 - printf "::set-output name=checks::%s" "$checks" 40 - 15 + - name: Clone repository 16 + uses: actions/checkout@v3 17 + with: 18 + token: "${{ secrets.GITHUB_TOKEN }}" 19 + - name: Install nix 20 + uses: cachix/install-nix-action@v18 21 + with: 22 + extra_nix_config: | 23 + auto-optimise-store = true 24 + access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} 25 + experimental-features = nix-command flakes 26 + substituters = https://cache.nixos.org/ https://nix-community.cachix.org 27 + trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= 28 + install_url: https://releases.nixos.org/nix/nix-2.12.0/install 29 + - name: Generate flake.json 30 + run: | 31 + nix flake show --json > flake.json 32 + - id: gen_packages 33 + run: | 34 + packages=$(jq -c '.packages."x86_64-linux" | keys' < flake.json) 35 + printf "::set-output name=packages::%s" "$packages" 36 + - id: gen_checks 37 + run: | 38 + checks=$(jq -c '.checks."x86_64-linux" | keys' < flake.json) 39 + printf "::set-output name=checks::%s" "$checks" 40 + 41 41 update_flake: 42 42 runs-on: ubuntu-20.04 43 43 steps: 44 - - name: Clone repository 45 - uses: actions/checkout@v3 46 - with: 47 - token: '${{ secrets.GITHUB_TOKEN }}' 48 - - name: Install nix 49 - uses: cachix/install-nix-action@v18 50 - with: 51 - extra_nix_config: | 52 - auto-optimise-store = true 53 - access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} 54 - experimental-features = nix-command flakes 55 - substituters = https://cache.nixos.org/ https://nix-community.cachix.org 56 - trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= 57 - install_url: https://releases.nixos.org/nix/nix-2.7.0/install 58 - - name: Set up git 59 - run: | 60 - git config user.email gitbot@nobbz.dev 61 - git config user.name "Git Bot" 62 - - name: Update the flake 63 - run: nix flake update 64 - - name: Store flake.lock 65 - uses: actions/upload-artifact@v3 66 - with: 67 - name: flake_lock 68 - path: flake.lock 44 + - name: Clone repository 45 + uses: actions/checkout@v3 46 + with: 47 + token: "${{ secrets.GITHUB_TOKEN }}" 48 + - name: Install nix 49 + uses: cachix/install-nix-action@v18 50 + with: 51 + extra_nix_config: | 52 + auto-optimise-store = true 53 + access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} 54 + experimental-features = nix-command flakes 55 + substituters = https://cache.nixos.org/ https://nix-community.cachix.org 56 + trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= 57 + install_url: https://releases.nixos.org/nix/nix-2.12.0/install 58 + - name: Set up git 59 + run: | 60 + git config user.email gitbot@nobbz.dev 61 + git config user.name "Git Bot" 62 + - name: Update the flake 63 + run: nix flake update 64 + - name: Store flake.lock 65 + uses: actions/upload-artifact@v3 66 + with: 67 + name: flake_lock 68 + path: flake.lock 69 69 70 70 build_flake: 71 71 runs-on: ubuntu-20.04 ··· 76 76 matrix: 77 77 package: ${{fromJson(needs.generate_matrix.outputs.packages)}} 78 78 steps: 79 - # - name: Prepare store folder 80 - # run: sudo mkdir -p /nix 81 - # - name: Free diskspace 82 - # uses: easimon/maximize-build-space@master 83 - # with: 84 - # build-mount-path: /nix 85 - # remove-dotnet: true 86 - # remove-android: true 87 - # remove-haskell: true 88 - - name: Clone repository 89 - uses: actions/checkout@v3 90 - with: 91 - token: '${{ secrets.GITHUB_TOKEN }}' 92 - - name: Install nix 93 - uses: cachix/install-nix-action@v18 94 - with: 95 - extra_nix_config: | 96 - auto-optimise-store = true 97 - access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} 98 - experimental-features = nix-command flakes 99 - substituters = https://cache.nixos.org/ https://nix-community.cachix.org 100 - trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= 101 - install_url: https://releases.nixos.org/nix/nix-2.7.0/install 102 - - name: Set up cachix 103 - uses: cachix/cachix-action@master # pathsToPush, please update once we have v11! 104 - with: 105 - name: nobbz 106 - signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}' 107 - pathsToPush: result 108 - - name: Restore flake.lock 109 - uses: actions/download-artifact@v3 110 - with: 111 - name: flake_lock 112 - - name: Build everything 113 - run: nix build .#${{ matrix.package }} 79 + # - name: Prepare store folder 80 + # run: sudo mkdir -p /nix 81 + # - name: Free diskspace 82 + # uses: easimon/maximize-build-space@master 83 + # with: 84 + # build-mount-path: /nix 85 + # remove-dotnet: true 86 + # remove-android: true 87 + # remove-haskell: true 88 + - name: Clone repository 89 + uses: actions/checkout@v3 90 + with: 91 + token: "${{ secrets.GITHUB_TOKEN }}" 92 + - name: Install nix 93 + uses: cachix/install-nix-action@v18 94 + with: 95 + extra_nix_config: | 96 + auto-optimise-store = true 97 + access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} 98 + experimental-features = nix-command flakes 99 + substituters = https://cache.nixos.org/ https://nix-community.cachix.org 100 + trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= 101 + install_url: https://releases.nixos.org/nix/nix-2.12.0/install 102 + - name: Set up cachix 103 + uses: cachix/cachix-action@master # pathsToPush, please update once we have v11! 104 + with: 105 + name: nobbz 106 + signingKey: "${{ secrets.CACHIX_SIGNING_KEY }}" 107 + pathsToPush: result 108 + - name: Restore flake.lock 109 + uses: actions/download-artifact@v3 110 + with: 111 + name: flake_lock 112 + - name: Build everything 113 + run: nix build .#${{ matrix.package }} 114 114 115 115 build_checks: 116 116 runs-on: ubuntu-20.04 ··· 121 121 matrix: 122 122 check: ${{fromJson(needs.generate_matrix.outputs.checks)}} 123 123 steps: 124 - - name: Clone repository 125 - uses: actions/checkout@v3 126 - with: 127 - token: '${{ secrets.GITHUB_TOKEN }}' 128 - - name: Install nix 129 - uses: cachix/install-nix-action@v18 130 - with: 131 - extra_nix_config: | 132 - auto-optimise-store = true 133 - access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} 134 - experimental-features = nix-command flakes 135 - substituters = https://cache.nixos.org/ https://nix-community.cachix.org 136 - trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= 137 - install_url: https://releases.nixos.org/nix/nix-2.7.0/install 138 - - name: Set up cachix 139 - uses: cachix/cachix-action@master # pathsToPush, please update once we have v11! 140 - with: 141 - name: nobbz 142 - signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}' 143 - skipPush: true 144 - - name: Restore flake.lock 145 - uses: actions/download-artifact@v3 146 - with: 147 - name: flake_lock 148 - - name: Build everything 149 - run: nix build .#checks.x86_64-linux.${{ matrix.check }} --no-link 124 + - name: Clone repository 125 + uses: actions/checkout@v3 126 + with: 127 + token: "${{ secrets.GITHUB_TOKEN }}" 128 + - name: Install nix 129 + uses: cachix/install-nix-action@v18 130 + with: 131 + extra_nix_config: | 132 + auto-optimise-store = true 133 + access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} 134 + experimental-features = nix-command flakes 135 + substituters = https://cache.nixos.org/ https://nix-community.cachix.org 136 + trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= 137 + install_url: https://releases.nixos.org/nix/nix-2.12.0/install 138 + - name: Set up cachix 139 + uses: cachix/cachix-action@master # pathsToPush, please update once we have v11! 140 + with: 141 + name: nobbz 142 + signingKey: "${{ secrets.CACHIX_SIGNING_KEY }}" 143 + skipPush: true 144 + - name: Restore flake.lock 145 + uses: actions/download-artifact@v3 146 + with: 147 + name: flake_lock 148 + - name: Build everything 149 + run: nix build .#checks.x86_64-linux.${{ matrix.check }} --no-link 150 150 151 151 check_flake: 152 152 runs-on: ubuntu-20.04 153 153 needs: [update_flake] 154 154 continue-on-error: true 155 155 steps: 156 - - name: Clone repository 157 - uses: actions/checkout@v3 158 - with: 159 - token: '${{ secrets.GITHUB_TOKEN }}' 160 - - name: Install nix 161 - uses: cachix/install-nix-action@v18 162 - with: 163 - extra_nix_config: | 164 - auto-optimise-store = true 165 - access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} 166 - experimental-features = nix-command flakes 167 - substituters = https://cache.nixos.org/ https://nix-community.cachix.org 168 - trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= 169 - install_url: https://releases.nixos.org/nix/nix-2.7.0/install 170 - - name: Restore flake.lock 171 - uses: actions/download-artifact@v3 172 - with: 173 - name: flake_lock 174 - - name: Build everything 175 - run: | 176 - nix flake check --keep-going 156 + - name: Clone repository 157 + uses: actions/checkout@v3 158 + with: 159 + token: "${{ secrets.GITHUB_TOKEN }}" 160 + - name: Install nix 161 + uses: cachix/install-nix-action@v18 162 + with: 163 + extra_nix_config: | 164 + auto-optimise-store = true 165 + access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} 166 + experimental-features = nix-command flakes 167 + substituters = https://cache.nixos.org/ https://nix-community.cachix.org 168 + trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= 169 + install_url: https://releases.nixos.org/nix/nix-2.12.0/install 170 + - name: Restore flake.lock 171 + uses: actions/download-artifact@v3 172 + with: 173 + name: flake_lock 174 + - name: Build everything 175 + run: | 176 + nix flake check --keep-going 177 177 178 178 push_update: 179 179 runs-on: ubuntu-20.04 180 180 permissions: write-all 181 181 needs: [update_flake, build_flake, build_checks, check_flake] 182 182 steps: 183 - - name: Clone repository 184 - uses: actions/checkout@v3 185 - with: 186 - token: '${{ secrets.GITHUB_TOKEN }}' 187 - - name: Restore flake.lock 188 - uses: actions/download-artifact@v3 189 - with: 190 - name: flake_lock 191 - - name: Set up git 192 - run: | 193 - git config user.email gitbot@nobbz.dev 194 - git config user.name "Git Bot" 195 - - name: Create and merge PR 196 - run: | 197 - git switch -c updates-${{ github.run_id }} 198 - git commit -am "flake.lock: Update" 199 - git push -u origin updates-${{ github.run_id }} 200 - PR=$(gh pr create \ 201 - --assignee NobbZ \ 202 - --base main \ 203 - --body "Automatic flake update on $(date -I)" \ 204 - --fill \ 205 - --label bot \ 206 - --title "Auto update $(date -I)") 207 - gh pr merge $PR --merge --delete-branch 208 - env: 209 - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 183 + - name: Clone repository 184 + uses: actions/checkout@v3 185 + with: 186 + token: "${{ secrets.GITHUB_TOKEN }}" 187 + - name: Restore flake.lock 188 + uses: actions/download-artifact@v3 189 + with: 190 + name: flake_lock 191 + - name: Set up git 192 + run: | 193 + git config user.email gitbot@nobbz.dev 194 + git config user.name "Git Bot" 195 + - name: Create and merge PR 196 + run: | 197 + git switch -c updates-${{ github.run_id }} 198 + git commit -am "flake.lock: Update" 199 + git push -u origin updates-${{ github.run_id }} 200 + PR=$(gh pr create \ 201 + --assignee NobbZ \ 202 + --base main \ 203 + --body "Automatic flake update on $(date -I)" \ 204 + --fill \ 205 + --label bot \ 206 + --title "Auto update $(date -I)") 207 + gh pr merge $PR --merge --delete-branch 208 + env: 209 + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}