Replace nix-serve usage with nix-serve-ng

This commit is contained in:
James Eversole 2023-06-27 13:01:30 -05:00
parent db6195695e
commit 17055e30a4
2 changed files with 13 additions and 2 deletions

View File

@ -9,7 +9,10 @@
enableACME = true;
forceSSL = true;
root = "/var/www/cache.matri.cx";
locations."/".proxyPass = "http://${config.services.nix-serve.bindAddress}:${toString config.services.nix-serve.port}";
locations."/" = {
extraConfig = "allow 192.168.0.0\/24;\ndeny all;";
proxyPass = "http://${config.services.nix-serve.bindAddress}:${toString config.services.nix-serve.port}";
};
};
virtualHosts."caitlynncox.com" = {

View File

@ -1,11 +1,18 @@
{
description = "eve-psr-nix0 - Home Server";
inputs = {
nixpkgs.url = "nixpkgs/nixos-23.05";
agenix = {
url = "github:ryantm/agenix";
inputs.nixpkgs.follows = "nixpkgs";
inputs.darwin.follows = "";
};
nixpkgs.url = "nixpkgs/nixos-23.05";
nix-serve-ng = {
url = github:aristanetworks/nix-serve-ng;
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, agenix, ... }@attrs:
@ -28,6 +35,7 @@
imports = [
agenix.nixosModules.default
nix-serve-ng.nixosModules.default
./application/containers.nix
./application/nginx.nix