modules: services: nix-cache: use harmonia

This commit is contained in:
Bruno BELANYI 2023-08-19 14:16:19 +02:00
parent 19d2916e1c
commit 6d9d835e1c

View file

@ -1,5 +1,5 @@
# Binary cache through nix-serve # Binary cache
{ config, lib, pkgs, ... }: { config, lib, ... }:
let let
cfg = config.my.services.nix-cache; cfg = config.my.services.nix-cache;
in in
@ -32,19 +32,15 @@ in
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
services.nix-serve = { services.harmonia = {
enable = true; enable = true;
bindAddress = "127.0.0.1"; settings = {
bind = "127.0.0.1:${toString cfg.port}";
inherit (cfg) priority;
};
inherit (cfg) signKeyPath = cfg.secretKeyFile;
port
secretKeyFile
;
package = pkgs.nix-serve-ng;
extraParams = "--priority=${toString cfg.priority}";
}; };
my.services.nginx.virtualHosts = [ my.services.nginx.virtualHosts = [