forked from c3d2/nix-config
harmonia: dedupe code with nixos-modules
This commit is contained in:
parent
a2925001fa
commit
65bc6519ec
|
@ -34,6 +34,7 @@ If you want to have an additional backport, cherry-pick or other change, please
|
|||
### nixos-modules repo
|
||||
|
||||
The nixos-modules repo lives at <https://github.com/supersandro2000/nixos-modules> and is mirrored to <https://gitea.c3d2.de/c3d2/nixos-modules>.
|
||||
Auto generated documentation about all options is available at <https://supersandro2000.github.io/nixos-modules/>.
|
||||
It contains options sandro shares between his private nixos configs and the C3D2 one.
|
||||
It sets many options by default and when searching for a particular setting you should always grep this repo, too.
|
||||
In question ask sandro and consider improving the documentation about this with comments and readme explanations.
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
{ config, lib, libS, pkgs, ... }:
|
||||
|
||||
let
|
||||
cachePort = 5000;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
|
@ -155,15 +152,11 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
# A rust nix binary cache
|
||||
harmonia = {
|
||||
enable = true;
|
||||
settings = {
|
||||
bind = "[::]:${toString cachePort}";
|
||||
workers = 20;
|
||||
max_connection_rate = 1024;
|
||||
priority = 50;
|
||||
};
|
||||
domain = "nix-cache.hq.c3d2.de";
|
||||
port = 5000;
|
||||
settings.workers = 20;
|
||||
signKeyPath = config.sops.secrets."nix/signing-key/secretKey".path;
|
||||
};
|
||||
|
||||
|
@ -182,14 +175,6 @@ in
|
|||
"nix-cache.hq.c3d2.de" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:${toString cachePort}";
|
||||
extraConfig = ''
|
||||
brotli off;
|
||||
gzip off;
|
||||
zstd off;
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue