Binary Cache should almost work now. Switched to older Kernel on Lilim.
This commit is contained in:
parent
6fe0cbebe2
commit
782cd1efae
4 changed files with 25 additions and 9 deletions
|
@ -9,8 +9,6 @@
|
|||
extraOptions = ''
|
||||
build-timeout = 86400 # 24 hours
|
||||
'';
|
||||
sshServe.enable = if config.services.hydra.enable then true else false;
|
||||
sshServe.keys = if config.services.hydra.enable then [ (builtins.readFile /secret/nix-ssh.pub) ] else [];
|
||||
binaryCachePublicKeys = [ (builtins.readFile /secret/hydra_cache.pub) ];
|
||||
trustedBinaryCaches = [
|
||||
"https://cache.nixos.org"
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
let
|
||||
localpkgs = import <nixpkgs-local> {};
|
||||
# vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
|
||||
in {
|
||||
imports = [ <nixpkgs/nixos/modules/installer/scan/not-detected.nix> ];
|
||||
|
||||
|
@ -9,7 +10,7 @@ in {
|
|||
loader.systemd-boot.enable = true;
|
||||
loader.efi.canTouchEfiVariables = true;
|
||||
cleanTmpDir = true;
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
kernelPackages = pkgs.linuxPackages_4_19;
|
||||
initrd.kernelModules = [ "hid-multitouch" ];
|
||||
initrd.availableKernelModules = [ "hid-microsoft" "hid-multitouch" "xhci_pci" "nvme" "usb_storage" "sd_mod" ];
|
||||
kernelModules = [ "kvm-intel" "hid-microsoft" "hid-multitouch" "uinput" ];
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
with lib;
|
||||
|
||||
mkIf (elem "hydra" config.machine.services) {
|
||||
mkIf (elem "hydra" config.machine.services) rec {
|
||||
# also take a look at ../conf/nix.nix
|
||||
nix.buildMachines = [
|
||||
{
|
||||
|
@ -43,4 +43,16 @@ mkIf (elem "hydra" config.machine.services) {
|
|||
upload_logs_to_binary_cache = true
|
||||
'';
|
||||
};
|
||||
|
||||
services.nix-serve = {
|
||||
enable = true;
|
||||
bindAddress = "172.0.0.1";
|
||||
port = 5000;
|
||||
secretKeyFile = "/secret/hydra_cache";
|
||||
extraParams = ''
|
||||
# Dont know how to change the store root yet...
|
||||
# --user hydra-queue-runner
|
||||
# --group hydra
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
@ -42,13 +42,18 @@ mkIf (elem "nginx" config.machine.services) {
|
|||
}
|
||||
'';
|
||||
};
|
||||
"cache.${config.machine.domain}" = mkIf config.services.hydra.enable {
|
||||
"cache.${config.machine.domain}" = mkIf config.services.nix-serve.enable {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
root = "/var/cache/hydra";
|
||||
# extraConfig = ''
|
||||
# autoindex on;
|
||||
# '';
|
||||
extraConfig = ''
|
||||
location / {
|
||||
proxy_pass http://${config.services.nix-serve.bindAddress}:${toString config.services.nix-serve.port};
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header REMOTE_ADDR $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto https;
|
||||
}
|
||||
'';
|
||||
};
|
||||
"mail.${config.machine.domain}" = mkIf config.mailserver.enable {
|
||||
enableACME = true;
|
||||
|
|
Loading…
Reference in a new issue