hydra, cgit and vm-sala on mothership

This commit is contained in:
Andrea Ciceri 2023-04-11 23:45:52 +02:00
parent 58e7ae54f0
commit 026a0d0180
Signed by: aciceri
SSH key fingerprint: SHA256:/AagBweyV4Hlfg9u092n8hbHwD5fcB6A3qhDiDA65Rg
9 changed files with 489 additions and 0 deletions

View file

@ -0,0 +1,29 @@
{
config,
lib,
...
}: let
cfg = config.services.my-nix-serve;
in {
imports = [../nginx-base];
options.services.my-nix-serve = {
domain = lib.mkOption {
type = lib.types.str;
default = "cache.aciceri.dev";
};
};
config = {
services.nix-serve = {
enable = true;
secretKeyFile = config.age.secrets.cache-private-key.path;
# Public key: cache.aciceri.dev:4e9sFjWPUOjGwTJE98PXinJJZLwPz0m5nKsAe63MY3E=
};
services.nginx.virtualHosts."${cfg.domain}" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://127.0.0.1:${builtins.toString config.services.nix-serve.port}";
};
};
};
}