mirror of
https://git.sr.ht/~rouven/nixos-config
synced 2025-04-25 16:08:30 +02:00
configured nix-serve
This commit is contained in:
parent
c3131ca53c
commit
33bfb1c7eb
3 changed files with 24 additions and 2 deletions
|
@ -9,6 +9,7 @@
|
|||
./modules/nextcloud
|
||||
./modules/vaultwarden
|
||||
./modules/nginx
|
||||
./modules/nix-serve
|
||||
];
|
||||
|
||||
boot = {
|
||||
|
|
18
hosts/nuc/modules/nix-serve/default.nix
Normal file
18
hosts/nuc/modules/nix-serve/default.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{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}";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue