replace http cache with build machines and ssh

This commit is contained in:
Rouven Seifert 2023-06-12 16:49:45 +02:00
parent 33a2c28aad
commit f567dff94a
Signed by: rouven.seifert
GPG key ID: B95E8FE6B11C4D09
11 changed files with 72 additions and 55 deletions

View file

@ -12,7 +12,6 @@
./modules/nextcloud
./modules/vaultwarden
./modules/nginx
./modules/nix-serve
];
boot = {
@ -26,6 +25,12 @@
cores = 3;
auto-optimise-store = true;
};
sops.secrets."store/secretkey" = { };
nix.extraOptions = ''
secret-key-files = ${config.sops.secrets."store/secretkey".path}
'';
environment.persistence."/nix/persist/system" = {
directories = [
"/etc/ssh"
@ -75,8 +80,8 @@
users.users.root.initialHashedPassword = "$y$j9T$hYM7FT2hn3O7OWBn9uz8e0$XquxONcPSke6YjdRGwOzGxC0/92hgP7PIB0y0K.Qdr/";
users.users.root.openssh.authorizedKeys.keyFiles = [
../../keys/ssh/rouven-thinkpad
../../keys/ssh/root-thinkpad
../../keys/ssh/rouven-pixel
# ../../keys/ssh/rouven-smartcard
];
system.stateVersion = "22.11";

View file

@ -1,18 +0,0 @@
{ config, ... }:
let
domain = "cache.rfive.de";
in
{
sops.secrets."nix-serve/secretkey" = { };
services.nix-serve = {
enable = true;
secretKeyFile = config.sops.secrets."nix-serve/secretkey".path;
};
services.nginx.virtualHosts."${domain}" = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://127.0.0.1:${toString config.services.nix-serve.port}";
};
};
}