From 1e19b7ca2f9389e8c569b2f88db603bf089345c3 Mon Sep 17 00:00:00 2001 From: "root@nixos-nas" <> Date: Wed, 11 Jun 2025 18:59:31 +0000 Subject: [PATCH] nix-cache --- configuration.nix | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/configuration.nix b/configuration.nix index b1dd1d6..859a67d 100644 --- a/configuration.nix +++ b/configuration.nix @@ -75,4 +75,25 @@ users.groups.docker.members = [ "nicole" ]; programs.virt-manager.enable = true; + + #### nix-Cache + + # --- Binary-Cache ------------------------------------------------------------- + services.nix-serve = { + enable = true; + secretKeyFile = "/var/cache/nix/secret-key"; + openFirewall = true; + port = 5000; + }; + + nix.settings = { + substituters = [ "http://nix-nas:5000" "https://cache.nixos.org" ]; + trusted-public-keys = [ + "nas-cache:rgCDn9SwmvxvhjiEiRgrjAuAEyRiJT/aBIlywetuypM=" + "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" # Standard-Key vom upstream Cache + ]; + secret-key-files = [ "/var/cache/nix/secret-key" ]; + }; + + }