matemat: add auth

This commit is contained in:
Astro 2021-03-06 02:28:46 +01:00
parent 0fdb04bcb8
commit 8347def09b
3 changed files with 15 additions and 6 deletions

View File

@ -40,11 +40,11 @@
}, },
"secrets": { "secrets": {
"locked": { "locked": {
"lastModified": 1614901575, "lastModified": 1614993322,
"narHash": "sha256-aGKpOBH/3REMxsyGddq7Jd+uhCAj5hfHIFr3otJUZXo=", "narHash": "sha256-JcC7oPS8qCmk+abBGUzNvgV2B9XACcNSjc0pfX0ldoA=",
"ref": "master", "ref": "master",
"rev": "990543b60319b1d09d13c3e7506188a69f690c8e", "rev": "30c7719adc2615e87e3b38596384ecec24347883",
"revCount": 79, "revCount": 81,
"type": "git", "type": "git",
"url": "ssh://git@gitea.c3d2.de:2222/c3d2-admins/secrets.git" "url": "ssh://git@gitea.c3d2.de:2222/c3d2-admins/secrets.git"
}, },

View File

@ -140,6 +140,9 @@
./lib/lxc-container.nix ./lib/lxc-container.nix
./hosts/containers/matemat ./hosts/containers/matemat
"${yammat}/nixos-module.nix" "${yammat}/nixos-module.nix"
({ ... }: {
nixpkgs.overlays = [ secrets.overlays.matemat ];
})
]; ];
system = "x86_64-linux"; system = "x86_64-linux";
}; };

View File

@ -1,4 +1,4 @@
{ lib, ... }: { lib, pkgs, ... }:
{ {
c3d2 = { c3d2 = {
isInHq = true; isInHq = true;
@ -19,7 +19,13 @@
default = true; default = true;
forceSSL = true; forceSSL = true;
enableACME = true; enableACME = true;
locations."/".proxyPass = "http://localhost:3000"; locations."/" = {
proxyPass = "http://localhost:3000";
extraConfig = ''
auth_basic secured;
auth_basic_user_file ${pkgs.matemat-auth};
'';
};
}; };
}; };
security.acme = { security.acme = {