infrastructure

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 4b2c4e16b3c9c1d74fb91dc9dffad9eaaf27f64f
parent 45f3b6b47a6fb602e7520879763684f038631cd4
Author: Silas Brack <silasbrack@gmail.com>
Date:   Thu,  2 Apr 2026 19:44:25 +0200

Use forgejo actions runners

Diffstat:
A.forgejo/workflows/nixos.yaml | 26++++++++++++++++++++++++++
D.github/workflows/nixos.yaml | 55-------------------------------------------------------
Mflake.lock | 20++++++++++----------
Mnixos/configuration-debian-2gb-hel1-1.nix | 1+
4 files changed, 37 insertions(+), 65 deletions(-)

diff --git a/.forgejo/workflows/nixos.yaml b/.forgejo/workflows/nixos.yaml @@ -0,0 +1,26 @@ +name: "NixOS" + +on: + push: + branches: ["main"] + pull_request: + branches: ["main"] + +jobs: + nixos: + runs-on: native + steps: + - uses: actions/checkout@v4 + + - name: Build + run: | + if [[ "$(nix eval .#nixosConfigurations.nixos-s-1vcpu-512mb-10gb-ams3-01.pkgs.system)" = '"x86_64-linux"' ]]; then + nix build .#nixosConfigurations.nixos-s-1vcpu-512mb-10gb-ams3-01.config.system.build.toplevel + fi + + - name: Check + run: nix flake check + + - name: Deploy + if: github.ref == 'refs/heads/main' + run: nix run nixpkgs#nixos-rebuild -- --fast --flake .#nixos-s-1vcpu-512mb-10gb-ams3-01 --target-host root@188.166.127.72 test diff --git a/.github/workflows/nixos.yaml b/.github/workflows/nixos.yaml @@ -1,55 +0,0 @@ -name: "NixOS" - -on: - push: - branches: ["main"] - pull_request: - branches: ["main"] - -jobs: - nixos: - runs-on: ubuntu-latest - steps: - - name: Maximize build space - uses: AdityaGarg8/remove-unwanted-software@v1 - with: - remove-dotnet: "true" - remove-android: "true" - remove-haskell: "true" - - - uses: pierotofy/set-swap-space@master - with: - swap-size-gb: 10 - - - uses: actions/checkout@v4 - - - uses: cachix/install-nix-action@v25 - with: - nix_path: nixpkgs=channel:nixos-unstable - - # - uses: DeterminateSystems/magic-nix-cache-action@v2 - - - name: Build - run: | - if [[ "$(nix eval .#nixosConfigurations.nixos-s-1vcpu-512mb-10gb-ams3-01.pkgs.system)" = '"x86_64-linux"' ]]; then - nix build .#nixosConfigurations.nixos-s-1vcpu-512mb-10gb-ams3-01.config.system.build.toplevel - fi - - - name: Check - run: nix flake check - - - name: Deploy - if: github.ref == 'refs/heads/main' - env: - SSH_KEY: ${{secrets.SSH_KEY}} - SSH_KNOWN_HOSTS: ${{secrets.SSH_KNOWN_HOSTS}} - run: | - # Set up SSH key - mkdir -p ~/.ssh - printenv SSH_KEY > ~/.ssh/id_ed25519 - printenv SSH_KNOWN_HOSTS > ~/.ssh/known_hosts - chmod 600 ~/.ssh/id_ed25519 - chmod 600 ~/.ssh/known_hosts - - # Deploy to server - NIX_SSHOPTS="-i ~/.ssh/id_ed25519 -o UserKnownHostsFile=~/.ssh/known_hosts -t" nix run nixpkgs#nixos-rebuild -- --fast --flake .#nixos-s-1vcpu-512mb-10gb-ams3-01 --target-host root@188.166.127.72 test diff --git a/flake.lock b/flake.lock @@ -24,11 +24,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1772988118, - "narHash": "sha256-v/V/Tf1h0diF8j0fY0wKGbk5dLtMX4tMv1woTfYc8h4=", + "lastModified": 1772989041, + "narHash": "sha256-W+GFT+iOHg/Ch5y/JTNb0IyI6F7nhnSGOhZcwb+UKwM=", "ref": "refs/heads/main", - "rev": "f19656486a6caee2147272908b9cce525bf56eba", - "revCount": 42, + "rev": "8e6a96633a27079a3a0a49f10b0bdca862ab466e", + "revCount": 44, "type": "git", "url": "ssh://git@github.com/silasbrack/mkv" }, @@ -87,11 +87,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1772736753, - "narHash": "sha256-au/m3+EuBLoSzWUCb64a/MZq6QUtOV8oC0D9tY2scPQ=", + "lastModified": 1774610258, + "narHash": "sha256-HaThtroVD9wRdx7KQk0B75JmFcXlMUoEdDFNOMOlsOs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "917fec990948658ef1ccd07cef2a1ef060786846", + "rev": "832efc09b4caf6b4569fbf9dc01bec3082a00611", "type": "github" }, "original": { @@ -185,11 +185,11 @@ "nixpkgs": "nixpkgs_4" }, "locked": { - "lastModified": 1772944399, - "narHash": "sha256-xTzsSd3r5HBeufSZ3fszAn0ldfKctvsYG7tT2YJg5gY=", + "lastModified": 1774910634, + "narHash": "sha256-B+rZDPyktGEjOMt8PcHKYmgmKoF+GaNAFJhguktXAo0=", "owner": "Mic92", "repo": "sops-nix", - "rev": "c8e69670b316d6788e435a3aa0bda74eb1b82cc0", + "rev": "19bf3d8678fbbfbc173beaa0b5b37d37938db301", "type": "github" }, "original": { diff --git a/nixos/configuration-debian-2gb-hel1-1.nix b/nixos/configuration-debian-2gb-hel1-1.nix @@ -97,6 +97,7 @@ users.users = { root.openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGqHJMc2SCzL50SO9Flfnhn012p1dmp4Iph8lPQ2aoe/ silasbrack@gmail.com" # Desktop + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPGZOv4PvL/NvBiDFnCh8V6xm03k/C3b8O82z1+tmboI gitea-runner" ]; silas = { isNormalUser = true;