mirror of
https://github.com/nmasur/dotfiles
synced 2025-10-11 14:53:17 +00:00
Compare commits
6 Commits
832a71a4a1
...
3ddd460490
Author | SHA1 | Date | |
---|---|---|---|
|
3ddd460490 | ||
|
8b3ab57b34 | ||
|
483833cdcb | ||
|
57e593aabc | ||
|
b119256ba6 | ||
|
54948353dd |
42
flake.lock
generated
42
flake.lock
generated
@@ -22,11 +22,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1755825449,
|
"lastModified": 1758102940,
|
||||||
"narHash": "sha256-XkiN4NM9Xdy59h69Pc+Vg4PxkSm9EWl6u7k6D5FZ5cM=",
|
"narHash": "sha256-wwqf3+A8EiqwWpcAaPN20QXJLlpGPpwtLTrzgnngI2o=",
|
||||||
"owner": "lnl7",
|
"owner": "lnl7",
|
||||||
"repo": "nix-darwin",
|
"repo": "nix-darwin",
|
||||||
"rev": "8df64f819698c1fee0c2969696f54a843b2231e8",
|
"rev": "ebd0bfc11fc2b5cff37401e9b3703881ad5fabbd",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -43,11 +43,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1756115622,
|
"lastModified": 1758287904,
|
||||||
"narHash": "sha256-iv8xVtmLMNLWFcDM/HcAPLRGONyTRpzL9NS09RnryRM=",
|
"narHash": "sha256-IGmaEf3Do8o5Cwp1kXBN1wQmZwQN3NLfq5t4nHtVtcU=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "disko",
|
"repo": "disko",
|
||||||
"rev": "bafad29f89e83b2d861b493aa23034ea16595560",
|
"rev": "67ff9807dd148e704baadbd4fd783b54282ca627",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -156,11 +156,11 @@
|
|||||||
"rust-overlay": "rust-overlay"
|
"rust-overlay": "rust-overlay"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1756477005,
|
"lastModified": 1758204752,
|
||||||
"narHash": "sha256-e/FNNIT/LPuoruzRQZf5z5L5GApq1G2y2PShy+Lakhs=",
|
"narHash": "sha256-tgblfdzdM3XAzYHHvA9GX9SR2P8NG2IzewmfnRmTUxg=",
|
||||||
"owner": "helix-editor",
|
"owner": "helix-editor",
|
||||||
"repo": "helix",
|
"repo": "helix",
|
||||||
"rev": "77ff51caa440b1066e0a1920007ab5e148dd4856",
|
"rev": "0ae37dc52ba715100893c327414bcb1a1924a4c3",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -176,11 +176,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1756496801,
|
"lastModified": 1758296614,
|
||||||
"narHash": "sha256-IYIsnPy+cJxe8RbDHBrCtfJY0ry2bG2H7WvMcewiGS8=",
|
"narHash": "sha256-l60D1i0aaSqemy9dL7wP0ePMfcv/oZbeKpvUMY+q0kQ=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "77a71380c38fb2a440b4b5881bbc839f6230e1cb",
|
"rev": "55b1f5b7b191572257545413b98e37abab2fdb00",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -306,11 +306,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1756386758,
|
"lastModified": 1758198701,
|
||||||
"narHash": "sha256-1wxxznpW2CKvI9VdniaUnTT2Os6rdRJcRUf65ZK9OtE=",
|
"narHash": "sha256-7To75JlpekfUmdkUZewnT6MoBANS0XVypW6kjUOXQwc=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "dfb2f12e899db4876308eba6d93455ab7da304cd",
|
"rev": "0147c2f1d54b30b5dd6d4a8c8542e8d7edf93b5d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -344,11 +344,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1756524478,
|
"lastModified": 1758339501,
|
||||||
"narHash": "sha256-2oSBlcYCgwrVxUZwM8MV6hBFsfsWFbeN5ErQiCA+38s=",
|
"narHash": "sha256-ot58+ry2wvGMYck0b80dB9G5CxdAcrYR54SUNn+/Kmg=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nur",
|
"repo": "nur",
|
||||||
"rev": "e82a8b0095f54edb6bbbb1d862f3da502dca1396",
|
"rev": "957eddcb40c8c7dd4120f808786ea4d8b77a7feb",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -484,11 +484,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1755261305,
|
"lastModified": 1758123407,
|
||||||
"narHash": "sha256-EOqCupB5X5WoGVHVcfOZcqy0SbKWNuY3kq+lj1wHdu8=",
|
"narHash": "sha256-4qwMlR0Q4Zr2rjUFauYIldfjzffYt3G5tZ1uPFPPYGU=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NixOS-WSL",
|
"repo": "NixOS-WSL",
|
||||||
"rev": "203a7b463f307c60026136dd1191d9001c43457f",
|
"rev": "ba2b3b6c0bc42442559a3b090f032bc8d501f5e3",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@@ -114,6 +114,7 @@
|
|||||||
bookmarks = "keep.${baseName}";
|
bookmarks = "keep.${baseName}";
|
||||||
books = "books.${baseName}";
|
books = "books.${baseName}";
|
||||||
budget = "money.${baseName}";
|
budget = "money.${baseName}";
|
||||||
|
contacts = "contacts.${baseName}";
|
||||||
content = "cloud.${baseName}";
|
content = "cloud.${baseName}";
|
||||||
download = "download.${baseName}";
|
download = "download.${baseName}";
|
||||||
files = "files.${baseName}";
|
files = "files.${baseName}";
|
||||||
|
@@ -31,10 +31,10 @@ rec {
|
|||||||
power-user.enable = true;
|
power-user.enable = true;
|
||||||
};
|
};
|
||||||
nmasur.presets.programs.helix.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
|
# File systems must be declared in order to boot
|
||||||
|
|
||||||
# # This is the root filesystem containing NixOS
|
# # This is the root filesystem containing NixOS
|
||||||
|
@@ -68,7 +68,7 @@ in
|
|||||||
# Tell Caddy to use Cloudflare DNS for ACME challenge validation
|
# Tell Caddy to use Cloudflare DNS for ACME challenge validation
|
||||||
services.caddy.package = pkgs.caddy.withPlugins {
|
services.caddy.package = pkgs.caddy.withPlugins {
|
||||||
plugins = [ "github.com/caddy-dns/cloudflare@v0.2.1" ];
|
plugins = [ "github.com/caddy-dns/cloudflare@v0.2.1" ];
|
||||||
hash = "sha256-S1JN7brvH2KIu7DaDOH1zij3j8hWLLc0HdnUc+L89uU=";
|
hash = "sha256-AcWko5513hO8I0lvbCLqVbM1eWegAhoM0J0qXoWL/vI=";
|
||||||
};
|
};
|
||||||
nmasur.presets.services.caddy.tlsPolicies = [
|
nmasur.presets.services.caddy.tlsPolicies = [
|
||||||
{
|
{
|
||||||
|
@@ -158,7 +158,7 @@ in
|
|||||||
};
|
};
|
||||||
script = ''
|
script = ''
|
||||||
${pkgs.awscli2}/bin/aws s3 sync --exclude */gitea.db* \
|
${pkgs.awscli2}/bin/aws s3 sync --exclude */gitea.db* \
|
||||||
${giteaPath}/ \
|
${giteaPath}/repositories/ \
|
||||||
s3://${config.nmasur.presets.services.litestream.s3.bucket}/gitea-data/ \
|
s3://${config.nmasur.presets.services.litestream.s3.bucket}/gitea-data/ \
|
||||||
--endpoint-url=https://${config.nmasur.presets.services.litestream.s3.endpoint}
|
--endpoint-url=https://${config.nmasur.presets.services.litestream.s3.endpoint}
|
||||||
'';
|
'';
|
||||||
|
@@ -17,9 +17,11 @@ in
|
|||||||
enable = true;
|
enable = true;
|
||||||
mediaDir = "/data/generic/paperless";
|
mediaDir = "/data/generic/paperless";
|
||||||
passwordFile = config.secrets.paperless.dest;
|
passwordFile = config.secrets.paperless.dest;
|
||||||
|
configureTika = true; # Enable processing of emails
|
||||||
settings = {
|
settings = {
|
||||||
PAPERLESS_OCR_USER_ARGS = builtins.toJSON { invalidate_digital_signatures = true; };
|
PAPERLESS_OCR_USER_ARGS = builtins.toJSON { invalidate_digital_signatures = true; };
|
||||||
PAPERLESS_URL = "https://${hostnames.paperless}";
|
PAPERLESS_URL = "https://${hostnames.paperless}";
|
||||||
|
PAPERLESS_DATE_ORDER = "MDY"; # Check document for US-formatted dates
|
||||||
|
|
||||||
# Enable if changing the path name in Caddy
|
# Enable if changing the path name in Caddy
|
||||||
# PAPERLESS_FORCE_SCRIPT_NAME = "/paperless";
|
# PAPERLESS_FORCE_SCRIPT_NAME = "/paperless";
|
||||||
|
@@ -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}"; }
|
||||||
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
@@ -36,6 +36,7 @@ in
|
|||||||
ntfy-sh.enable = lib.mkDefault true;
|
ntfy-sh.enable = lib.mkDefault true;
|
||||||
pgweb.enable = lib.mkDefault true;
|
pgweb.enable = lib.mkDefault true;
|
||||||
postgresql.enable = lib.mkDefault true;
|
postgresql.enable = lib.mkDefault true;
|
||||||
|
stalwart-mail.enable = lib.mkDefault true;
|
||||||
thelounge.enable = lib.mkDefault true;
|
thelounge.enable = lib.mkDefault true;
|
||||||
uptime-kuma.enable = lib.mkDefault true;
|
uptime-kuma.enable = lib.mkDefault true;
|
||||||
vaultwarden.enable = lib.mkDefault true;
|
vaultwarden.enable = lib.mkDefault true;
|
||||||
|
Reference in New Issue
Block a user