configuration
flake
hosts
_iso
aluminium
astatine
backup-4
beryllium
carbon
clerie-backup
dn42-il-gw1
dn42-il-gw5
dn42-il-gw6
dn42-ildix-clerie
dn42-ildix-service
gatekeeper
hydra-1
hydra-2
krypton
mail-2
monitoring-3
nonat
osmium
palladium
porter
storage-2
tungsten
web-2
blog.nix
bula22.nix
chaosevents.nix
clerie.nix
configuration.nix
drop.nix
etebase.nix
feeds.nix
fieldpoc.nix
gitea.nix
hardware-configuration.nix
ip.nix
legal.nix
meow.nix
milchinsel.nix
mitel-ommclient2.nix
nix-install.nix
nurausstieg.nix
ping.nix
public.nix
radicale.nix
reichartstrasse.nix
secrets.json
ssh.pub
uptimestatus.nix
wetter.nix
zinc
lib
modules
pkgs
profiles
users
.gitignore
README.md
flake.lock
flake.nix
67 lines
1.7 KiB
Nix
67 lines
1.7 KiB
Nix
{ pkgs, ... }:
|
|
|
|
{
|
|
services.nginx.virtualHosts = {
|
|
"www.clerie.de" = {
|
|
enableACME = true;
|
|
forceSSL = true;
|
|
locations."/" = {
|
|
return = "301 https://clerie.de$request_uri";
|
|
};
|
|
};
|
|
|
|
"clerie.de" = {
|
|
enableACME = true;
|
|
forceSSL = true;
|
|
root = pkgs.fetchgit {
|
|
url = "https://git.clerie.de/clerie/clerie.de.git";
|
|
rev = "ec744cbeaf99ae4fd4832d7e594bc72bfabc8706";
|
|
hash = "sha256-EG8UO/9ycyWjtqLUX7ydctLdIbq/j8zylEK7YYvEwmI=";
|
|
};
|
|
locations."/ssh" = {
|
|
extraConfig = ''
|
|
types {
|
|
text/plain pub;
|
|
}
|
|
'';
|
|
root = pkgs.clerie-keys;
|
|
};
|
|
locations."= /ssh/known_hosts" = {
|
|
alias = pkgs.writeText "known_hosts" (import ../../lib/ssh-known-hosts.nix);
|
|
extraConfig = ''
|
|
types { }
|
|
default_type "text/plain; charset=utf-8";
|
|
'';
|
|
};
|
|
locations."/gpg" = {
|
|
extraConfig = ''
|
|
types {
|
|
text/plain asc;
|
|
}
|
|
'';
|
|
root = pkgs.clerie-keys;
|
|
};
|
|
locations."~ ^/.well-known/openpgpkey/hu/[a-z0-9]+/?$" = {
|
|
root = pkgs.clerie-keys;
|
|
extraConfig = ''
|
|
types { }
|
|
default_type application/octet-stream;
|
|
add_header Access-Control-Allow-Origin * always;
|
|
try_files /gpg/clerie@clerie.de =404;
|
|
'';
|
|
};
|
|
locations."= /.well-known/openpgpkey/policy" = {
|
|
extraConfig = ''
|
|
types { }
|
|
default_type application/octet-stream;
|
|
add_header Access-Control-Allow-Origin * always;
|
|
'';
|
|
return = "200 ''";
|
|
};
|
|
extraConfig = ''
|
|
access_log /var/log/nginx/clerie.de.log combined_anon;
|
|
'';
|
|
};
|
|
};
|
|
}
|