feat: enable http cache

This commit is contained in:
Noa Aarts 2024-10-21 10:43:46 +02:00
parent 9f8865441b
commit d697845887
Signed by: noa
GPG key ID: 1850932741EFF672
2 changed files with 12 additions and 7 deletions

View file

@ -1,17 +1,19 @@
{ ... }: { { config, lib, ... }: {
nix = { nix = {
settings = { settings = {
# auto optimise every so often # auto optimise every so often
# auto-optimise-store = true; # auto-optimise-store = true;
experimental-features = [ "nix-command" "flakes" ]; experimental-features = [ "nix-command" "flakes" ];
substituters = [ substituters = [
(lib.mkIf (config.networking.hostName != "nuOS") "https://cache.itepastra.nl")
"https://hyprland.cachix.org" "https://hyprland.cachix.org"
"https://cache.iog.io" "https://cache.iog.io"
"https://cuda-maintainers.cachix.org" "https://cuda-maintainers.cachix.org"
"https://nix-community.cachix.org/" "https://nix-community.cachix.org"
"https://cache.iog.io" "https://cache.iog.io"
]; ];
trusted-public-keys = [ trusted-public-keys = [
"cache.itepastra.nl:zCB+g5uXlDuFXbs9pI10UmidFQt17kFTaPywv+J33FQ="
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=" "hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ="
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E=" "cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="

View file

@ -45,11 +45,6 @@
}; };
}; };
nix.sshServe = {
enable = true;
keys = import ../../common/ssh-keys.nix;
};
# Allow unfree packages # Allow unfree packages
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
@ -135,6 +130,12 @@
}; };
services = { services = {
nix-serve = {
enable = true;
package = pkgs.nix-serve-ng;
secretKeyFile = "/secrets/nix-store-key.pem";
port = 22332;
};
github-runners = { github-runners = {
flurry-runner = { flurry-runner = {
enable = true; enable = true;
@ -233,6 +234,7 @@
}; };
"calendar.itepastra.nl" = proxy "itepastra.nl" "http://[::1]:29341"; "calendar.itepastra.nl" = proxy "itepastra.nl" "http://[::1]:29341";
"cache.itepastra.nl" = proxy "itepastra.nl" "http://[::1]:22332";
}; };
}; };
}; };
@ -250,6 +252,7 @@
"itepastra.nl".extraDomainNames = [ "itepastra.nl".extraDomainNames = [
"locked.itepastra.nl" "locked.itepastra.nl"
"calendar.itepastra.nl" "calendar.itepastra.nl"
"cache.itepastra.nl"
]; ];
}; };
}; };