6 Commits

Author SHA1 Message Date
github-actions[bot]
3ddd460490 flake.lock: Update
Flake lock file updates:

• Updated input 'darwin':
    'github:lnl7/nix-darwin/8df64f819698c1fee0c2969696f54a843b2231e8' (2025-08-22)
  → 'github:lnl7/nix-darwin/ebd0bfc11fc2b5cff37401e9b3703881ad5fabbd' (2025-09-17)
• Updated input 'disko':
    'github:nix-community/disko/bafad29f89e83b2d861b493aa23034ea16595560' (2025-08-25)
  → 'github:nix-community/disko/67ff9807dd148e704baadbd4fd783b54282ca627' (2025-09-19)
• Updated input 'helix':
    'github:helix-editor/helix/77ff51caa440b1066e0a1920007ab5e148dd4856' (2025-08-29)
  → 'github:helix-editor/helix/0ae37dc52ba715100893c327414bcb1a1924a4c3' (2025-09-18)
• Updated input 'home-manager':
    'github:nix-community/home-manager/77a71380c38fb2a440b4b5881bbc839f6230e1cb' (2025-08-29)
  → 'github:nix-community/home-manager/55b1f5b7b191572257545413b98e37abab2fdb00' (2025-09-19)
• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/dfb2f12e899db4876308eba6d93455ab7da304cd' (2025-08-28)
  → 'github:nixos/nixpkgs/0147c2f1d54b30b5dd6d4a8c8542e8d7edf93b5d' (2025-09-18)
• Updated input 'nur':
    'github:nix-community/nur/e82a8b0095f54edb6bbbb1d862f3da502dca1396' (2025-08-30)
  → 'github:nix-community/nur/957eddcb40c8c7dd4120f808786ea4d8b77a7feb' (2025-09-20)
• Updated input 'wsl':
    'github:nix-community/NixOS-WSL/203a7b463f307c60026136dd1191d9001c43457f' (2025-08-15)
  → 'github:nix-community/NixOS-WSL/ba2b3b6c0bc42442559a3b090f032bc8d501f5e3' (2025-09-17)
2025-09-20 03:46:37 +00:00
Noah Masur
8b3ab57b34 enable stalwart-mail for contacts 2025-09-17 03:35:20 +00:00
Noah Masur
483833cdcb fix: must update stateversion to fix meilisearch out of date 2025-09-17 02:45:46 +00:00
Noah Masur
57e593aabc fix: only sync gitea repos to backups 2025-09-16 11:47:46 +00:00
Noah Masur
b119256ba6 update cloudflare caddy 2025-09-16 11:45:03 +00:00
Noah Masur
54948353dd enable paperless email processing to pdf 2025-09-16 11:44:56 +00:00
8 changed files with 85 additions and 25 deletions

42
flake.lock generated
View File

@@ -22,11 +22,11 @@
]
},
"locked": {
"lastModified": 1755825449,
"narHash": "sha256-XkiN4NM9Xdy59h69Pc+Vg4PxkSm9EWl6u7k6D5FZ5cM=",
"lastModified": 1758102940,
"narHash": "sha256-wwqf3+A8EiqwWpcAaPN20QXJLlpGPpwtLTrzgnngI2o=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "8df64f819698c1fee0c2969696f54a843b2231e8",
"rev": "ebd0bfc11fc2b5cff37401e9b3703881ad5fabbd",
"type": "github"
},
"original": {
@@ -43,11 +43,11 @@
]
},
"locked": {
"lastModified": 1756115622,
"narHash": "sha256-iv8xVtmLMNLWFcDM/HcAPLRGONyTRpzL9NS09RnryRM=",
"lastModified": 1758287904,
"narHash": "sha256-IGmaEf3Do8o5Cwp1kXBN1wQmZwQN3NLfq5t4nHtVtcU=",
"owner": "nix-community",
"repo": "disko",
"rev": "bafad29f89e83b2d861b493aa23034ea16595560",
"rev": "67ff9807dd148e704baadbd4fd783b54282ca627",
"type": "github"
},
"original": {
@@ -156,11 +156,11 @@
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1756477005,
"narHash": "sha256-e/FNNIT/LPuoruzRQZf5z5L5GApq1G2y2PShy+Lakhs=",
"lastModified": 1758204752,
"narHash": "sha256-tgblfdzdM3XAzYHHvA9GX9SR2P8NG2IzewmfnRmTUxg=",
"owner": "helix-editor",
"repo": "helix",
"rev": "77ff51caa440b1066e0a1920007ab5e148dd4856",
"rev": "0ae37dc52ba715100893c327414bcb1a1924a4c3",
"type": "github"
},
"original": {
@@ -176,11 +176,11 @@
]
},
"locked": {
"lastModified": 1756496801,
"narHash": "sha256-IYIsnPy+cJxe8RbDHBrCtfJY0ry2bG2H7WvMcewiGS8=",
"lastModified": 1758296614,
"narHash": "sha256-l60D1i0aaSqemy9dL7wP0ePMfcv/oZbeKpvUMY+q0kQ=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "77a71380c38fb2a440b4b5881bbc839f6230e1cb",
"rev": "55b1f5b7b191572257545413b98e37abab2fdb00",
"type": "github"
},
"original": {
@@ -306,11 +306,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1756386758,
"narHash": "sha256-1wxxznpW2CKvI9VdniaUnTT2Os6rdRJcRUf65ZK9OtE=",
"lastModified": 1758198701,
"narHash": "sha256-7To75JlpekfUmdkUZewnT6MoBANS0XVypW6kjUOXQwc=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "dfb2f12e899db4876308eba6d93455ab7da304cd",
"rev": "0147c2f1d54b30b5dd6d4a8c8542e8d7edf93b5d",
"type": "github"
},
"original": {
@@ -344,11 +344,11 @@
]
},
"locked": {
"lastModified": 1756524478,
"narHash": "sha256-2oSBlcYCgwrVxUZwM8MV6hBFsfsWFbeN5ErQiCA+38s=",
"lastModified": 1758339501,
"narHash": "sha256-ot58+ry2wvGMYck0b80dB9G5CxdAcrYR54SUNn+/Kmg=",
"owner": "nix-community",
"repo": "nur",
"rev": "e82a8b0095f54edb6bbbb1d862f3da502dca1396",
"rev": "957eddcb40c8c7dd4120f808786ea4d8b77a7feb",
"type": "github"
},
"original": {
@@ -484,11 +484,11 @@
]
},
"locked": {
"lastModified": 1755261305,
"narHash": "sha256-EOqCupB5X5WoGVHVcfOZcqy0SbKWNuY3kq+lj1wHdu8=",
"lastModified": 1758123407,
"narHash": "sha256-4qwMlR0Q4Zr2rjUFauYIldfjzffYt3G5tZ1uPFPPYGU=",
"owner": "nix-community",
"repo": "NixOS-WSL",
"rev": "203a7b463f307c60026136dd1191d9001c43457f",
"rev": "ba2b3b6c0bc42442559a3b090f032bc8d501f5e3",
"type": "github"
},
"original": {

View File

@@ -114,6 +114,7 @@
bookmarks = "keep.${baseName}";
books = "books.${baseName}";
budget = "money.${baseName}";
contacts = "contacts.${baseName}";
content = "cloud.${baseName}";
download = "download.${baseName}";
files = "files.${baseName}";

View File

@@ -31,10 +31,10 @@ rec {
power-user.enable = true;
};
nmasur.presets.programs.helix.enable = true;
home.stateVersion = "23.05";
home.stateVersion = "25.05";
};
system.stateVersion = "23.05";
system.stateVersion = "25.05";
# File systems must be declared in order to boot
# # This is the root filesystem containing NixOS

View File

@@ -68,7 +68,7 @@ in
# Tell Caddy to use Cloudflare DNS for ACME challenge validation
services.caddy.package = pkgs.caddy.withPlugins {
plugins = [ "github.com/caddy-dns/cloudflare@v0.2.1" ];
hash = "sha256-S1JN7brvH2KIu7DaDOH1zij3j8hWLLc0HdnUc+L89uU=";
hash = "sha256-AcWko5513hO8I0lvbCLqVbM1eWegAhoM0J0qXoWL/vI=";
};
nmasur.presets.services.caddy.tlsPolicies = [
{

View File

@@ -158,7 +158,7 @@ in
};
script = ''
${pkgs.awscli2}/bin/aws s3 sync --exclude */gitea.db* \
${giteaPath}/ \
${giteaPath}/repositories/ \
s3://${config.nmasur.presets.services.litestream.s3.bucket}/gitea-data/ \
--endpoint-url=https://${config.nmasur.presets.services.litestream.s3.endpoint}
'';

View File

@@ -17,9 +17,11 @@ in
enable = true;
mediaDir = "/data/generic/paperless";
passwordFile = config.secrets.paperless.dest;
configureTika = true; # Enable processing of emails
settings = {
PAPERLESS_OCR_USER_ARGS = builtins.toJSON { invalidate_digital_signatures = true; };
PAPERLESS_URL = "https://${hostnames.paperless}";
PAPERLESS_DATE_ORDER = "MDY"; # Check document for US-formatted dates
# Enable if changing the path name in Caddy
# PAPERLESS_FORCE_SCRIPT_NAME = "/paperless";

View File

@@ -0,0 +1,56 @@
# Stalwart is a self-hosted email service, but in my case I want to use it as a
# vCard contacts database server and ignore the email component.
{ config, lib, ... }:
let
inherit (config.nmasur.settings) hostnames;
cfg = config.nmasur.presets.services.stalwart-mail;
in
{
options.nmasur.presets.services.stalwart-mail = {
enable = lib.mkEnableOption "Stalwart mail and contacts server";
port = lib.mkOption {
type = lib.types.port;
description = "Port to use for the localhost";
default = 7982;
};
};
config = lib.mkIf cfg.enable {
services.stalwart-mail = {
enable = true;
settings = {
server.listener.http = {
bind = [ "127.0.0.1:${builtins.toString cfg.port}" ];
protocol = "http";
};
authentication.fallback-admin = {
user = "admin";
secret = "$6$W/zXJP0xtZSUQqIe$DedCz9ncAn8mtfQVCg8Fzguuz.x8u1dfVU/d7wKyc6ujLuY4WCdtY0OeYwpv8huJfKAgBKE3go2MTrT99ID7I1";
};
};
};
# Configure Cloudflare DNS to point to this machine
services.cloudflare-dyndns.domains = [ hostnames.contacts ];
# Allow web traffic to Caddy
nmasur.presets.services.caddy.routes = [
{
match = [ { host = [ hostnames.contacts ]; } ];
handle = [
{
handler = "reverse_proxy";
upstreams = [
{ dial = "localhost:${builtins.toString cfg.port}"; }
];
}
];
}
];
};
}

View File

@@ -36,6 +36,7 @@ in
ntfy-sh.enable = lib.mkDefault true;
pgweb.enable = lib.mkDefault true;
postgresql.enable = lib.mkDefault true;
stalwart-mail.enable = lib.mkDefault true;
thelounge.enable = lib.mkDefault true;
uptime-kuma.enable = lib.mkDefault true;
vaultwarden.enable = lib.mkDefault true;