hydra
, cgit
and vm-sala
on mothership
This commit is contained in:
parent
58e7ae54f0
commit
026a0d0180
9 changed files with 489 additions and 0 deletions
29
modules/nix-serve/default.nix
Normal file
29
modules/nix-serve/default.nix
Normal 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}";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue