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

View File

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

View File

@ -1,4 +1,4 @@
{ lib, ... }:
{ lib, pkgs, ... }:
{
c3d2 = {
isInHq = true;
@ -19,7 +19,13 @@
default = true;
forceSSL = 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 = {