From 063c1b157444336b046955b943c96980be1d3db8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?m=C3=BCde?= Date: Sat, 26 Sep 2026 21:21:48 +0200 Subject: [PATCH] add preem bincache --- .forgejo/workflows/build.yaml | 9 ++++++++- flake.lock | 21 +++++++++++++++++++++ flake.nix | 4 ++++ nixosConfigurations.nix | 4 ++++ nixosModules/distributed-builds.nix | 3 +++ 5 files changed, 40 insertions(+), 1 deletion(-) diff --git a/.forgejo/workflows/build.yaml b/.forgejo/workflows/build.yaml index 5282fda..36d9d80 100644 --- a/.forgejo/workflows/build.yaml +++ b/.forgejo/workflows/build.yaml @@ -15,7 +15,14 @@ jobs: # keep-sorted end steps: - uses: https://code.forgejo.org/actions/checkout@v4 - - run: nix build --no-link .#nixosConfigurations.${{ matrix.host }}.config.system.build.toplevel + - run: nix build .#nixosConfigurations.${{ matrix.host }}.config.system.build.toplevel + - run: | + nix shell --inputs-from . nixpkgs#attic-client -c sh -c ' + attic-client login preem https://preem-bincache.trollhive.monster "$PREEM_PUSH_TOKEN" + attic-client push preem:grid ./result + ' + env: + PREEM_PUSH_TOKEN: ${{ secrets.PREEM_PUSH_TOKEN }} # nightly-flake-update.yaml opens PRs from flake-update-* branches; if # the build fails on one of those, close it rather than leaving a diff --git a/flake.lock b/flake.lock index 17c0891..378d6b4 100644 --- a/flake.lock +++ b/flake.lock @@ -736,6 +736,26 @@ "type": "github" } }, + "preem-bincache": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1790448186, + "narHash": "sha256-HujB2GINVEj4QdIa1KSTLwsGHYk0ywDBddfe9R1Z/9Y=", + "ref": "refs/heads/main", + "rev": "9a41a48cec4f11cf7dfae586482b6be150e6c80a", + "revCount": 12, + "type": "git", + "url": "https://forge.darkest.space/mara/preem-nix-bincache.git" + }, + "original": { + "type": "git", + "url": "https://forge.darkest.space/mara/preem-nix-bincache.git" + } + }, "quickshell": { "inputs": { "nixpkgs": [ @@ -772,6 +792,7 @@ "nixpkgs-unstable": "nixpkgs-unstable", "nova-shell": "nova-shell", "nur": "nur", + "preem-bincache": "preem-bincache", "servicepoint-cli": "servicepoint-cli", "servicepoint-simulator": "servicepoint-simulator", "servicepoint-tanks": "servicepoint-tanks", diff --git a/flake.nix b/flake.nix index b386e1f..3123aaa 100644 --- a/flake.nix +++ b/flake.nix @@ -58,6 +58,10 @@ url = "github:nix-community/NUR"; inputs.nixpkgs.follows = "nixpkgs"; }; + preem-bincache = { + url = "git+https://forge.darkest.space/mara/preem-nix-bincache.git"; + inputs.nixpkgs.follows = "nixpkgs"; + }; servicepoint-cli = { url = "git+https://git.berlin.ccc.de/servicepoint/servicepoint-cli.git"; inputs = { diff --git a/nixosConfigurations.nix b/nixosConfigurations.nix index b020cf7..c1107f9 100644 --- a/nixosConfigurations.nix +++ b/nixosConfigurations.nix @@ -6,15 +6,18 @@ let allDevices = import ./devices.nix { inherit (inputs) self; }; inherit (inputs) self + # keep-sorted start home-manager lanzaboote nova-shell + preem-bincache servicepoint-cli servicepoint-simulator servicepoint-tanks stylix trollshell zerforschen-plus + # keep-sorted end ; forDevice = f: lib.mapAttrs (device: value: f (value // { inherit device; })) allDevices; in @@ -46,6 +49,7 @@ forDevice ( # keep-sorted start home-manager.nixosModules.home-manager lanzaboote.nixosModules.lanzaboote + preem-bincache.nixosModules.default stylix.nixosModules.stylix trollshell.nixosModules.default zerforschen-plus.nixosModules.default diff --git a/nixosModules/distributed-builds.nix b/nixosModules/distributed-builds.nix index 38edc14..7905608 100644 --- a/nixosModules/distributed-builds.nix +++ b/nixosModules/distributed-builds.nix @@ -154,6 +154,9 @@ in }; }) + { + preem-bincache.client.enable = true; + } ] ); }