Compare commits
4 Commits
8afdf287ee
...
polecat/du
| Author | SHA1 | Date | |
|---|---|---|---|
| 7610a9c0e1 | |||
|
|
ff57d3c043 | ||
| 3a36594dc9 | |||
| 5a7064d07b |
@@ -18,3 +18,50 @@ jobs:
|
|||||||
run: nix flake check
|
run: nix flake check
|
||||||
env:
|
env:
|
||||||
NIX_CONFIG: "access-tokens = git.johnogle.info=${{ secrets.GITEA_ACCESS_TOKEN }}"
|
NIX_CONFIG: "access-tokens = git.johnogle.info=${{ secrets.GITEA_ACCESS_TOKEN }}"
|
||||||
|
|
||||||
|
build-and-cache:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: check
|
||||||
|
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
machine:
|
||||||
|
- nix-book
|
||||||
|
- boxy
|
||||||
|
- zix790prors
|
||||||
|
- nix-deck
|
||||||
|
- john-endesktop
|
||||||
|
- live-usb
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v6
|
||||||
|
|
||||||
|
- uses: https://git.johnogle.info/johno/gitea-actions/nix-setup@v1
|
||||||
|
|
||||||
|
- name: Build ${{ matrix.machine }}
|
||||||
|
id: build
|
||||||
|
run: |
|
||||||
|
OUT_PATH=$(nix build .#nixosConfigurations.${{ matrix.machine }}.config.system.build.toplevel --no-link --print-out-paths)
|
||||||
|
echo "out_path=$OUT_PATH" >> "$GITHUB_OUTPUT"
|
||||||
|
env:
|
||||||
|
NIX_CONFIG: "access-tokens = git.johnogle.info=${{ secrets.GITEA_ACCESS_TOKEN }}"
|
||||||
|
|
||||||
|
- name: Sign and push to cache
|
||||||
|
run: |
|
||||||
|
# Write signing key
|
||||||
|
echo "${{ secrets.NIX_SIGNING_KEY }}" > /tmp/signing-key
|
||||||
|
chmod 600 /tmp/signing-key
|
||||||
|
|
||||||
|
# Sign the closure
|
||||||
|
nix store sign --key-file /tmp/signing-key -r "${{ steps.build.outputs.out_path }}"
|
||||||
|
|
||||||
|
# Setup SSH key for cache push
|
||||||
|
mkdir -p ~/.ssh
|
||||||
|
echo "${{ secrets.CACHE_SSH_KEY }}" > ~/.ssh/cache_key
|
||||||
|
chmod 600 ~/.ssh/cache_key
|
||||||
|
ssh-keyscan -H ${{ secrets.CACHE_HOST }} >> ~/.ssh/known_hosts 2>/dev/null || true
|
||||||
|
|
||||||
|
# Push to cache
|
||||||
|
nix copy --to "ssh-ng://${{ secrets.CACHE_USER }}@${{ secrets.CACHE_HOST }}?ssh-key=$HOME/.ssh/cache_key" "${{ steps.build.outputs.out_path }}"
|
||||||
|
env:
|
||||||
|
NIX_CONFIG: "access-tokens = git.johnogle.info=${{ secrets.GITEA_ACCESS_TOKEN }}"
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ with lib;
|
|||||||
4000 # nfs callback
|
4000 # nfs callback
|
||||||
4001 # nlockmgr
|
4001 # nlockmgr
|
||||||
4002 # mountd
|
4002 # mountd
|
||||||
|
5000 # harmonia binary cache
|
||||||
20048 # mountd
|
20048 # mountd
|
||||||
];
|
];
|
||||||
allowedUDPPorts = [
|
allowedUDPPorts = [
|
||||||
@@ -148,6 +149,16 @@ with lib;
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Harmonia binary cache server
|
||||||
|
# Replaces the broken k8s deployment with native NixOS service
|
||||||
|
services.harmonia = {
|
||||||
|
enable = true;
|
||||||
|
signKeyPath = "/etc/harmonia/signing-key.private";
|
||||||
|
settings = {
|
||||||
|
bind = "[::]:5000";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# Time zone
|
# Time zone
|
||||||
time.timeZone = "America/Los_Angeles"; # Adjust as needed
|
time.timeZone = "America/Los_Angeles"; # Adjust as needed
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
"https://nix-cache.johnogle.info"
|
"https://nix-cache.johnogle.info"
|
||||||
];
|
];
|
||||||
trusted-public-keys = [
|
trusted-public-keys = [
|
||||||
"nix-cache.johnogle.info-1:IC5x8BxnrqkU9XqhMdDnZLtSg9Y3rBJVXhve5DJ92J0="
|
"nix-cache.johnogle.info-1:G0ZGQwcSC4+4SDDFHZI/ZX3a6uFrs/5cjA5Jvaypj0I="
|
||||||
];
|
];
|
||||||
fallback = true;
|
fallback = true;
|
||||||
connect-timeout = 5;
|
connect-timeout = 5;
|
||||||
|
|||||||
Reference in New Issue
Block a user