Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 21 additions & 7 deletions .github/workflows/nixos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,18 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Clean up runner
- name: Setup Tailscale
uses: tailscale/github-action@84a3f23bb4d843bcf4da6cf824ec1be473daf4de
with:
authkey: "${{ secrets.TAILSCALE_PREAUTHKEY }}"
args: "--login-server=https://vpn.clicks.codes"

- name: Write out SSH key
env:
MIDNIGHT_SSH_KEY: ${{ secrets.MIDNIGHT_SSH_KEY }}
run: |
# Commands taken from https://github.com/easimon/maximize-build-space/blob/master/action.yml
sudo rm -rf /usr/local/lib/android
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/hostedtoolcache/CodeQL
echo "$MIDNIGHT_SSH_KEY" > ../midnight_ssh_key
chmod 600 ../midnight_ssh_key

- uses: actions/checkout@v4

Expand All @@ -52,10 +58,18 @@ jobs:
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0

- name: Build all systems
run: nix build -f ./nilla.nix packages.allNixOSSystems.result.x86_64-linux --show-trace
run: |
nix build \
-f ./nilla.nix packages.allNixOSSystems.result.x86_64-linux \
--eval-store auto --store "ssh-ng://remoteBuilds@midnight?ssh-key=$(realpath ../midnight_ssh_key)&base64-ssh-public-host-key=c3NoLWVkMjU1MTkgQUFBQUMzTnphQzFsWkRJMU5URTVBQUFBSU5wbnFKeDlBTGVSS0k0ekVvZnNIL0ZZMFJLaTVsWWtDRVMvR2NWbHNSWncgcm9vdEBhMWQyCg==" \
--show-trace

- name: Build all homes
run: nix build -f ./nilla.nix packages.allHomes.result.x86_64-linux --show-trace
run: |
nix build \
-f ./nilla.nix packages.allHomes.result.x86_64-linux \
--eval-store auto --store "ssh-ng://remoteBuilds@midnight?ssh-key=$(realpath ../midnight_ssh_key)&base64-ssh-public-host-key=c3NoLWVkMjU1MTkgQUFBQUMzTnphQzFsWkRJMU5URTVBQUFBSU5wbnFKeDlBTGVSS0k0ekVvZnNIL0ZZMFJLaTVsWWtDRVMvR2NWbHNSWncgcm9vdEBhMWQyCg==" \
--show-trace

- if: github.event_name == 'push'
name: Push to release branch
Expand Down
1 change: 1 addition & 0 deletions systems/midnight/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
imports = [
./hardware-configuration.nix
./hostname.nix
./remoteBuilds.nix
];
}
8 changes: 8 additions & 0 deletions systems/midnight/remoteBuilds.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# SPDX-FileCopyrightText: 2025 FreshlyBakedCake
#
# SPDX-License-Identifier: MIT
{
users.users.remoteBuilds.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOCmfKIvQ6ZClOWi3jHKC8HTQ5Ewo4Kzw6VCJCzrn4ih ci"
];
}
5 changes: 5 additions & 0 deletions systems/teal/headscale.nix
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ let
src = [ "mostlyturquoise" ];
dst = [ "tag:mostlyturquoise-minecraft-server:*" ];
} # Used to let mostlyturquoise and their friends access their minecraft servers without giving people too many permissions
{
action = "accept";
src = [ "tag:ci" ];
dst = [ "midnight:*" ];
} # Used to let CI remotely build on midnight
];

acls = [
Expand Down
Loading