manatee: Add dagbok

Served at dagbok.ppp.pm through nginx from 127.0.0.1:8093, with its token
from agenix, a Hetzner DNS-01 certificate, a dynamic DNS record and a
state backup snapshot.
This commit is contained in:
Alexander Heldt committed 2026-10-12 16:31:14 +02:00
1 parent bbae47fd77
commit 154f33f258
9 files changed
+101 -1

No files matched your search

Generated
+22
View File
@@ -56,6 +56,27 @@
"type": "github"
}
},
"dagbok": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1791814965,
"narHash": "sha256-twhXQEQ11IsGgFXuL1seiQN5MOd4dLaW9GfTituOXiE=",
"ref": "main",
"rev": "cfa0a08f96682176bb0a3f0a32e68ed22964c87d",
"revCount": 1,
"type": "git",
"url": "ssh://gitea@git.ppp.pm:1122/alex/dagbok.git"
},
"original": {
"ref": "main",
"type": "git",
"url": "ssh://gitea@git.ppp.pm:1122/alex/dagbok.git"
}
},
"darwin": {
"inputs": {
"nixpkgs": [
@@ -894,6 +915,7 @@
"root": {
"inputs": {
"agenix": "agenix",
"dagbok": "dagbok",
"disko": "disko",
"emacs-overlay": "emacs-overlay",
"home-manager": "home-manager_2",
+6
View File
@@ -110,6 +110,12 @@
# url = "git+file:///home/alex/code/todo?ref=main";
inputs.nixpkgs.follows = "nixpkgs";
};
dagbok = {
url = "git+ssh://gitea@git.ppp.pm:1122/alex/dagbok.git?ref=main";
# url = "git+file:///home/alex/code/own/dagbok?ref=main";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
+1
View File
@@ -31,6 +31,7 @@ in
"puppy.ppp.pm"
"todo.ppp.pm"
"schema.ppp.pm"
"dagbok.ppp.pm"
] (_: hetznerCert);
};
+59
View File
@@ -0,0 +1,59 @@
{
inputs,
lib,
config,
...
}:
let
enabled = config.mod.dagbok.enable;
nginxEnabled = config.mod.nginx.enable;
port = 8093;
in
{
options = {
mod.dagbok = {
enable = lib.mkEnableOption "Enable dagbok module";
};
};
imports = [
inputs.dagbok.nixosModules.default
];
config = lib.mkIf enabled {
mod.homepage.services = [
{
name = "Dagbok";
port = port;
description = "Work and personal journal";
url = "https://dagbok.ppp.pm";
}
];
services.dagbok = {
enable = true;
address = "127.0.0.1";
inherit port;
secureCookies = true;
timeZone = "Europe/Stockholm";
publicUrl = "https://dagbok.ppp.pm";
tokenFile = config.age.secrets."dagbok-token".path;
};
services.nginx = lib.mkIf nginxEnabled {
virtualHosts."dagbok.ppp.pm" = {
forceSSL = true;
useACMEHost = "dagbok.ppp.pm";
extraConfig = ''
client_max_body_size 32m;
'';
locations."/" = {
proxyPass = "http://127.0.0.1:${toString port}";
};
};
};
age.secrets."dagbok-token".file = ../../../../secrets/manatee/dagbok-token.age;
};
}
+1
View File
@@ -31,6 +31,7 @@ in
todo.enable = true;
schema.enable = true;
atuin.enable = true;
dagbok.enable = true;
};
};
}
@@ -251,7 +251,7 @@ in
];
script = ''
SUBDOMAINS="ha komga romm puppy todo schema"
SUBDOMAINS="ha komga romm puppy todo schema dagbok"
INTERFACE="enp3s0"
CURRENT_IP=$(curl -s --fail --interface "$INTERFACE" ifconfig.me)
+1
View File
@@ -108,6 +108,7 @@ let
snapshot /var/lib/solo-referee "$STATE/solo-referee"
snapshot /var/lib/todo "$STATE/todo"
snapshot /var/lib/schema "$STATE/schema"
snapshot /var/lib/dagbok "$STATE/dagbok"
snapshot /var/lib/komga-book-manager "$STATE/komga-book-manager"
snapshot /var/lib/komga-reading-stats "$STATE/komga-reading-stats"
+9
View File
@@ -0,0 +1,9 @@
age-encryption.org/v1
-> ssh-ed25519 wkRvNA HUrz7xanuOlXVzDIUTX9ekLPWJUu2FzVf3ZY/XbtqSA
7qKwaUNsHRtz7uNmk2FeBealiW8S3bAWcKJCFwhDhQ4
-> ssh-ed25519 vxPbZg HimT6C2qLyhitFXIad6wFBuwEljg8ER1TtE9FRvFHmM
9NcXChDz8Hma33umDRZkg8kWsG+8LDZKhT1/TSGcbMQ
-> ssh-ed25519 +oNaHQ ZrUo9uKv/edXs4tYAsgM5BgAbFAyPBlYkQ/yoMpj2Q8
71Q0DtYxwzzHjlbixWsJN4kzq432cS1cvltC/sTe4C8
--- +w7cxzo0KoG4wzfzrEcG0GB7XuBUlhyyunyObRn4TyQ
±ª'z¬¸»—}Ä�.ïVo¼wŽ�õ¼eJZ /žÈßXµ•0-R([Û9d'ô6ŠÒÏ•b�Z–öÊ.[�§~ÀtpÈvß)ÐÁ,=[:
+1
View File
@@ -46,6 +46,7 @@ in {
"manatee/puppy-tracker-invite-code.age".publicKeys = [ manatee alex ];
"manatee/solo-referee-api-key.age".publicKeys = [ manatee alex ];
"manatee/todo-token.age".publicKeys = [ manatee alex ];
"manatee/dagbok-token.age".publicKeys = [ manatee pinwheel alex ];
"manatee/schema-invite-code.age".publicKeys = [ manatee alex ];
"manatee/restic-password.age".publicKeys = [ manatee alex ];
"manatee/restic-cloud-sync-key.age".publicKeys = [ manatee alex ];