mirror of
https://github.com/nmasur/dotfiles
synced 2025-10-11 19:33:15 +00:00
Compare commits
1 Commits
3ddd460490
...
832a71a4a1
Author | SHA1 | Date | |
---|---|---|---|
|
832a71a4a1 |
42
flake.lock
generated
42
flake.lock
generated
@@ -22,11 +22,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1758102940,
|
"lastModified": 1757430124,
|
||||||
"narHash": "sha256-wwqf3+A8EiqwWpcAaPN20QXJLlpGPpwtLTrzgnngI2o=",
|
"narHash": "sha256-MhDltfXesGH8VkGv3hmJ1QEKl1ChTIj9wmGAFfWj/Wk=",
|
||||||
"owner": "lnl7",
|
"owner": "lnl7",
|
||||||
"repo": "nix-darwin",
|
"repo": "nix-darwin",
|
||||||
"rev": "ebd0bfc11fc2b5cff37401e9b3703881ad5fabbd",
|
"rev": "830b3f0b50045cf0bcfd4dab65fad05bf882e196",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -43,11 +43,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1758287904,
|
"lastModified": 1757508292,
|
||||||
"narHash": "sha256-IGmaEf3Do8o5Cwp1kXBN1wQmZwQN3NLfq5t4nHtVtcU=",
|
"narHash": "sha256-7lVWL5bC6xBIMWWDal41LlGAG+9u2zUorqo3QCUL4p4=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "disko",
|
"repo": "disko",
|
||||||
"rev": "67ff9807dd148e704baadbd4fd783b54282ca627",
|
"rev": "146f45bee02b8bd88812cfce6ffc0f933788875a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -156,11 +156,11 @@
|
|||||||
"rust-overlay": "rust-overlay"
|
"rust-overlay": "rust-overlay"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1758204752,
|
"lastModified": 1757688164,
|
||||||
"narHash": "sha256-tgblfdzdM3XAzYHHvA9GX9SR2P8NG2IzewmfnRmTUxg=",
|
"narHash": "sha256-IfSIZM7/4MwzxF769jVSBeB8JF4fHjYqaoan58HHw1E=",
|
||||||
"owner": "helix-editor",
|
"owner": "helix-editor",
|
||||||
"repo": "helix",
|
"repo": "helix",
|
||||||
"rev": "0ae37dc52ba715100893c327414bcb1a1924a4c3",
|
"rev": "c531b7a4faffe727adf78e1d3c2a54c0d85d0c0c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -176,11 +176,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1758296614,
|
"lastModified": 1757698511,
|
||||||
"narHash": "sha256-l60D1i0aaSqemy9dL7wP0ePMfcv/oZbeKpvUMY+q0kQ=",
|
"narHash": "sha256-UqHHGydF/q3jfYXCpvYLA0TWtvByOp1NwOKCUjhYmPs=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "55b1f5b7b191572257545413b98e37abab2fdb00",
|
"rev": "a3fcc92180c7462082cd849498369591dfb20855",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -306,11 +306,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1758198701,
|
"lastModified": 1757487488,
|
||||||
"narHash": "sha256-7To75JlpekfUmdkUZewnT6MoBANS0XVypW6kjUOXQwc=",
|
"narHash": "sha256-zwE/e7CuPJUWKdvvTCB7iunV4E/+G0lKfv4kk/5Izdg=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "0147c2f1d54b30b5dd6d4a8c8542e8d7edf93b5d",
|
"rev": "ab0f3607a6c7486ea22229b92ed2d355f1482ee0",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -344,11 +344,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1758339501,
|
"lastModified": 1757733608,
|
||||||
"narHash": "sha256-ot58+ry2wvGMYck0b80dB9G5CxdAcrYR54SUNn+/Kmg=",
|
"narHash": "sha256-k8k4VpFuMMiRGBKaut2YIUCJsu0DR/QDV9058C96/Xw=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nur",
|
"repo": "nur",
|
||||||
"rev": "957eddcb40c8c7dd4120f808786ea4d8b77a7feb",
|
"rev": "8a93aa245ea5190634a6eaaa0e6a4faaba850f69",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -484,11 +484,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1758123407,
|
"lastModified": 1757671225,
|
||||||
"narHash": "sha256-4qwMlR0Q4Zr2rjUFauYIldfjzffYt3G5tZ1uPFPPYGU=",
|
"narHash": "sha256-ZzoQXe7GV7QX3B3Iw59BogmrtHSP5Ig7MAPPD0cOFW4=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NixOS-WSL",
|
"repo": "NixOS-WSL",
|
||||||
"rev": "ba2b3b6c0bc42442559a3b090f032bc8d501f5e3",
|
"rev": "42666441c3ddf34a8583a77f07a2c7cae32513c3",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@@ -114,7 +114,6 @@
|
|||||||
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 = "25.05";
|
home.stateVersion = "23.05";
|
||||||
};
|
};
|
||||||
|
|
||||||
system.stateVersion = "25.05";
|
system.stateVersion = "23.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-AcWko5513hO8I0lvbCLqVbM1eWegAhoM0J0qXoWL/vI=";
|
hash = "sha256-S1JN7brvH2KIu7DaDOH1zij3j8hWLLc0HdnUc+L89uU=";
|
||||||
};
|
};
|
||||||
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}/repositories/ \
|
${giteaPath}/ \
|
||||||
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,11 +17,9 @@ 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";
|
||||||
|
@@ -1,56 +0,0 @@
|
|||||||
# 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,7 +36,6 @@ 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