mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 12:51:34 +01:00
vps-public: Only allow access to radicale's login page over vpn
This commit is contained in:
parent
2f246153d4
commit
d73e3744a8
1 changed files with 81 additions and 68 deletions
|
|
@ -13,7 +13,11 @@
|
||||||
ports.validate = true;
|
ports.validate = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
custom = {
|
custom =
|
||||||
|
let
|
||||||
|
sproutedDomain = "sprouted.cloud";
|
||||||
|
in
|
||||||
|
{
|
||||||
persistence.enable = true;
|
persistence.enable = true;
|
||||||
|
|
||||||
sops.enable = true;
|
sops.enable = true;
|
||||||
|
|
@ -38,12 +42,21 @@
|
||||||
|
|
||||||
nebula.enable = true;
|
nebula.enable = true;
|
||||||
sshd.enable = true;
|
sshd.enable = true;
|
||||||
|
|
||||||
|
caddy.virtualHosts."dav.${sproutedDomain}" = {
|
||||||
|
inherit (config.custom.web-services.radicale) port;
|
||||||
|
extraConfig = ''
|
||||||
|
respond /.web/ "Access denied" 403 {
|
||||||
|
close
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
web-services =
|
web-services =
|
||||||
let
|
let
|
||||||
|
privateDomain = config.custom.networking.overlay.domain;
|
||||||
sstorkDomain = "sstork.dev";
|
sstorkDomain = "sstork.dev";
|
||||||
sproutedDomain = "sprouted.cloud";
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
personal-blog = {
|
personal-blog = {
|
||||||
|
|
@ -76,13 +89,13 @@
|
||||||
|
|
||||||
radicale = {
|
radicale = {
|
||||||
enable = true;
|
enable = true;
|
||||||
domain = "dav.${sproutedDomain}";
|
domain = "dav.${privateDomain}";
|
||||||
doBackups = true;
|
doBackups = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
alloy = {
|
alloy = {
|
||||||
enable = true;
|
enable = true;
|
||||||
domain = "alloy.${config.networking.hostName}.${config.custom.networking.overlay.domain}";
|
domain = "alloy.${config.networking.hostName}.${privateDomain}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue