From fb3cf428fc34b5383721d7fee79cf2587fa1dc59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Mon, 19 Dec 2022 23:24:45 -0300 Subject: [PATCH] nix-serve: serve nix-store as binary cache --- flake.nix | 1 + system/configuration.nix | 2 ++ system/nix-serve.nix | 6 ++++++ 3 files changed, 9 insertions(+) create mode 100644 system/nix-serve.nix diff --git a/flake.nix b/flake.nix index c5aa23c..a5d36a6 100644 --- a/flake.nix +++ b/flake.nix @@ -85,6 +85,7 @@ modules = [ ./hosts/monolith.nix ./system/gitlab-runner.nix + ./system/nix-serve.nix ./system/btusb-kernel-patches.nix ./system/amdgpu-kernel-patches.nix ] ++ common_modules; diff --git a/system/configuration.nix b/system/configuration.nix index 2a8aba1..9b4820a 100644 --- a/system/configuration.nix +++ b/system/configuration.nix @@ -140,11 +140,13 @@ settings = { auto-optimise-store = true; substituters = [ + "https://nixcache.lelgenio.1337.cx:5000" "https://hyprland.cachix.org" "https://lelgenio.cachix.org" "https://wegank.cachix.org" ]; trusted-public-keys = [ + "nixcache.lelgenio.1337.cx:zxCfx7S658llDgAUG0JVyNrlAdFVvPniSdDOkvfTPS8=" "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" "lelgenio.cachix.org-1:W8tMlmDFLU/V+6DlChXjekxoHZpjgVHZpmusC4cueBc=" "wegank.cachix.org-1:xHignps7GtkPP/gYK5LvA/6UFyz98+sgaxBSy7qK0Vs=" diff --git a/system/nix-serve.nix b/system/nix-serve.nix new file mode 100644 index 0000000..ccdccb1 --- /dev/null +++ b/system/nix-serve.nix @@ -0,0 +1,6 @@ +{ config, pkgs, lib, ... }: { + services.nix-serve = { + enable = true; + secretKeyFile = "/var/cache-priv-key.pem"; + }; +}