blob: 77b944ef84a447a62a7bbd79569ee9ea67fde8e3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
{ config, lib, pkgs, ... }:
{
services.nginx.virtualHosts."docs.c3gsm.de" = {
forceSSL = true;
enableACME = true;
locations."/".extraConfig = ''
auth_basic "Restricted Content";
auth_basic_user_file ${pkgs.writeText "flix-user-pass" ''
c3gsm:$apr1$q9OrPI4C$7AY4EIp3J2Xc4eLMbPGE21
''};
root /srv/http/docs.c3gsm.de;
'';
};
services.nginx.virtualHosts."c3gsm.de" = {
forceSSL = true;
enableACME = true;
locations."/".extraConfig = ''
root /srv/http/c3gsm.de;
'';
};
users.users.c3gsm-docs = {
isNormalUser = true;
home = "/srv/http/docs.c3gsm.de";
createHome = true;
homeMode = "750";
useDefaultShell = true;
group = "nginx";
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAlW1fvCrVXhVH/z76fXBWYR/qyecYTE9VOOkFLJ6OwG user@osmocom-dev"
];
};
users.users.c3gsm = {
isNormalUser = true;
home = "/srv/http/c3gsm.de";
createHome = true;
homeMode = "750";
useDefaultShell = true;
group = "nginx";
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAlW1fvCrVXhVH/z76fXBWYR/qyecYTE9VOOkFLJ6OwG user@osmocom-dev"
];
};
}
|