forked from wurzel/fruitbasket
nix-serve: init at cache.ifsr.de
This commit is contained in:
parent
e4bb60adff
commit
a364e28bb8
3 changed files with 23 additions and 2 deletions
18
modules/nix-serve.nix
Normal file
18
modules/nix-serve.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{ config, ... }:
|
||||
let
|
||||
domain = "cache.${config.networking.domain}";
|
||||
in
|
||||
{
|
||||
sops.secrets."nix-serve/key" = { };
|
||||
services.nix-serve = {
|
||||
enable = true;
|
||||
secretKeyFile = config.sops.secrets."nix-serve/key".path;
|
||||
};
|
||||
services.nginx.virtualHosts."${domain}" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:${toString config.services.nix-serve.port}";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue