Caldav (wip mail)

This commit is contained in:
Henry Hiles 2025-03-24 21:40:42 -04:00
parent 5c69ae8390
commit edbef36e0e
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs
9 changed files with 134 additions and 4 deletions

View file

@ -1,4 +1,7 @@
{
services.caddy.enable = true;
services.caddy = {
enable = true;
email = "henry@henryhiles.com";
};
networking.firewall.allowedTCPPorts = [80 443];
}

View file

@ -0,0 +1,13 @@
{config, ...}: {
services = {
radicale = {
enable = true;
settings.auth = {
type = "htpasswd";
htpasswd_filename = config.age.secrets."caldavUsers.age".path;
htpasswd_encryption = "htpasswd";
};
};
caddy.virtualHosts."dav.henryhiles.com".extraConfig = "reverse_proxy localhost:5232";
};
}

View file

@ -0,0 +1,24 @@
{
config,
inputs,
...
}: {
# imports = [inputs.simple-nixos-mailserver.nixosModule];
# mailserver = {
# enable = true;
# fqdn = "mail2.henryhiles.com";
# domains = ["mail2.henryhiles.com"];
# loginAccounts = {
# "henry@henryhiles.com" = {
# hashedPasswordFile = config.age.secrets."mailPassword.age".path;
# aliases = ["contact@henryhiles.com"];
# };
# };
# certificateScheme = "acme";
# };
# services.caddy.virtualHosts."mail2.henryhiles.com" = {}; # To get Let's Encrypt cert
}

View file

@ -10,6 +10,6 @@
};
};
caddy.virtualHosts."vaultwarden.henryhiles.com".extraConfig = "reverse_proxy 127.0.0.1:8000";
caddy.virtualHosts."vaultwarden.henryhiles.com".extraConfig = "reverse_proxy localhost:8000";
};
}

88
flake.lock generated
View file

@ -90,6 +90,22 @@
"type": "github"
}
},
"blobs": {
"flake": false,
"locked": {
"lastModified": 1604995301,
"narHash": "sha256-wcLzgLec6SGJA8fx1OEN1yV/Py5b+U5iyYpksUY/yLw=",
"owner": "simple-nixos-mailserver",
"repo": "blobs",
"rev": "2cccdf1ca48316f2cfd1c9a0017e8de5a7156265",
"type": "gitlab"
},
"original": {
"owner": "simple-nixos-mailserver",
"repo": "blobs",
"type": "gitlab"
}
},
"darwin": {
"inputs": {
"nixpkgs": [
@ -145,6 +161,22 @@
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_2": {
"locked": {
"lastModified": 1733328505,
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
@ -361,7 +393,37 @@
"type": "github"
}
},
"nixpkgs-24_11": {
"locked": {
"lastModified": 1734083684,
"narHash": "sha256-5fNndbndxSx5d+C/D0p/VF32xDiJCJzyOqorOYW4JEo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "314e12ba369ccdb9b352a4db26ff419f7c49fa84",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-24.11",
"type": "indirect"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1732014248,
"narHash": "sha256-y/MEyuJ5oBWrWAic/14LaIr/u5E0wRVzyYsouYY3W6w=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "23e89b7da85c3640bbc2173fe04f4bd114342367",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-unstable",
"type": "indirect"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1741513245,
"narHash": "sha256-7rTAMNTY1xoBwz0h7ZMtEcd8LELk9R5TzBPoHuhNSCk=",
@ -428,10 +490,32 @@
"home-manager": "home-manager_2",
"nixpkgs": "nixpkgs",
"programsdb": "programsdb",
"simple-nixos-mailserver": "simple-nixos-mailserver",
"stylix": "stylix",
"wrapper-manager": "wrapper-manager"
}
},
"simple-nixos-mailserver": {
"inputs": {
"blobs": "blobs",
"flake-compat": "flake-compat",
"nixpkgs": "nixpkgs_2",
"nixpkgs-24_11": "nixpkgs-24_11"
},
"locked": {
"lastModified": 1742413977,
"narHash": "sha256-NkhM9GVu3HL+MiXtGD0TjuPCQ4GFVJPBZ8KyI2cFDGU=",
"owner": "simple-nixos-mailserver",
"repo": "nixos-mailserver",
"rev": "b4fbffe79c00f19be94b86b4144ff67541613659",
"type": "gitlab"
},
"original": {
"owner": "simple-nixos-mailserver",
"repo": "nixos-mailserver",
"type": "gitlab"
}
},
"stylix": {
"inputs": {
"base16": "base16",
@ -439,12 +523,12 @@
"base16-helix": "base16-helix",
"base16-vim": "base16-vim",
"firefox-gnome-theme": "firefox-gnome-theme_2",
"flake-compat": "flake-compat",
"flake-compat": "flake-compat_2",
"flake-utils": "flake-utils",
"git-hooks": "git-hooks",
"gnome-shell": "gnome-shell",
"home-manager": "home-manager_3",
"nixpkgs": "nixpkgs_2",
"nixpkgs": "nixpkgs_3",
"nur": "nur",
"systems": "systems_2",
"tinted-foot": "tinted-foot",

View file

@ -1,6 +1,7 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
simple-nixos-mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver";
agenix = {
url = "github:Henry-Hiles/agenix";
inputs.nixpkgs.follows = "nixpkgs";

BIN
secrets/caldavUsers.age Normal file

Binary file not shown.

5
secrets/mailPassword.age Normal file
View file

@ -0,0 +1,5 @@
age-encryption.org/v1
-> ssh-ed25519 VKQUdQ HLH8VPiSrQCLCA6jDDNgRwGxmBYx/tp29Ofk+lASR20
61DZpjUfqtSWg76RqZ4dQZMkLh3Z9/AXIshdnAZL2Os
--- NtZ+33l6WGz+UMzSLxqLVATi2fdk60CDdWm9X71sqm4
À§X±É*è²=}ź ìd%­ªÅgCÀ”¬Ÿîs2eœN3dYž¥åÐŽW7C¦~ltI<74>D_Köðp[ªªyÓÿÁ§Ðé|6É€m˜`F±tŸR0<52>¶ð