This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

1{ config, pkgs, ... }: 2{ 3 # nixpkgs.config.packageOverrides = p: { 4 # nix-serve = p.haskellPackages.nix-serve-ng; 5 # }; 6 # generate private key with: 7 # nix-store --generate-binary-cache-key my-secret-key my-public-key 8 clan.core.vars.generators.nix-serve = { 9 files."nix-serve.key" = { }; 10 files."nix-serve.pub" = { }; 11 runtimeInputs = with pkgs; [ 12 coreutils 13 nix 14 ]; 15 script = '' 16 nix-store --generate-binary-cache-key "$out"/nix-serve.key "$out"/nix-serve.pub 17 ''; 18 }; 19 services.nix-serve = { 20 enable = true; 21 secretKeyFile = config.clan.core.vars.generators.nix-serve.files."nix-serve.key".path; 22 port = 5005; 23 }; 24 25 services.nginx = { 26 enable = true; 27 virtualHosts.nix-serve = { 28 serverAliases = [ "cache.${config.networking.hostName}.r" ]; 29 locations."/".extraConfig = '' 30 proxy_pass http://localhost:${toString config.services.nix-serve.port}; 31 ''; 32 locations."= /nix-cache-info".extraConfig = '' 33 alias ${pkgs.writeText "cache-info" '' 34 StoreDir: /nix/store 35 WantMassQuery: 1 36 Priority: 42 37 ''}; 38 ''; 39 }; 40 }; 41}