From 1a1df52ba83a21004342b441e412be4d857b1239 Mon Sep 17 00:00:00 2001 From: Dmitry Voronin Date: Sat, 9 Mar 2024 17:17:06 +0300 Subject: [PATCH] NixServe : Add store local cache. --- flake.nix | 1 + module/NixServe.nix | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 module/NixServe.nix diff --git a/flake.nix b/flake.nix index 79a0fdde..3ff6b1b6 100644 --- a/flake.nix +++ b/flake.nix @@ -200,6 +200,7 @@ ./module/Docker.nix ./module/Ftpd.nix ./module/Gnome.nix + ./module/NixServe.nix ./module/Ollama.nix ./module/PowersaveAmd.nix ./user/Voronind.nix diff --git a/module/NixServe.nix b/module/NixServe.nix new file mode 100644 index 00000000..93bb970b --- /dev/null +++ b/module/NixServe.nix @@ -0,0 +1,9 @@ +{ pkgs, ... }: { + services.nix-serve = { + enable = true; + bindAddress = "0.0.0.0"; + package = pkgs.nix-serve-ng; + port = 5000; + secretKeyFile = "/root/nixcache/secret-key-file"; # Generate with: nix-store --generate-binary-cache-key nixcache.voronind.com secret-key-file public-key-file + }; +}