mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-06-16 18:15:13 -05:00
feat: hledger test
This commit is contained in:
parent
d145245648
commit
77f1db64d2
6 changed files with 3 additions and 50 deletions
|
@ -38,24 +38,11 @@ in
|
|||
value = dnsConfig;
|
||||
})
|
||||
[
|
||||
"nextcloud"
|
||||
"jellyfin"
|
||||
"minecraft"
|
||||
"ollama"
|
||||
"syncthing"
|
||||
"vaultwarden"
|
||||
"hledger"
|
||||
]
|
||||
)
|
||||
++ (map
|
||||
(service: {
|
||||
name = "${instanceName service}.${domain1}";
|
||||
value = dnsConfig;
|
||||
})
|
||||
[
|
||||
"nextcloud"
|
||||
"matrix"
|
||||
"owncast"
|
||||
]
|
||||
)
|
||||
++ (map
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
"logrotate"
|
||||
"minecraft"
|
||||
"ollama"
|
||||
"hledger"
|
||||
"upRootNutrition"
|
||||
# "peertube"
|
||||
"postgresql"
|
||||
|
|
|
@ -1,87 +0,0 @@
|
|||
{
|
||||
flake,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (flake.config.machines.devices)
|
||||
server
|
||||
;
|
||||
inherit (flake.config.services.instances)
|
||||
hledger
|
||||
web
|
||||
;
|
||||
service = hledger;
|
||||
localhost = web.localhost.address0;
|
||||
host = "${service.subdomain}.${web.domains.url0}";
|
||||
in
|
||||
{
|
||||
services = {
|
||||
hledger-web = {
|
||||
enable = true;
|
||||
host = localhost;
|
||||
baseUrl = "https://${host}";
|
||||
stateDir = service.paths.path0;
|
||||
port = service.ports.port0;
|
||||
journalFiles = [
|
||||
".hledger.journal"
|
||||
];
|
||||
allow = "edit";
|
||||
};
|
||||
caddy = {
|
||||
virtualHosts = {
|
||||
"${host}" = {
|
||||
extraConfig = ''
|
||||
redir /.well-known/carddav /remote.php/dav/ 301
|
||||
redir /.well-known/caldav /remote.php/dav/ 301
|
||||
|
||||
reverse_proxy ${localhost}:${toString service.ports.port0}
|
||||
|
||||
tls ${service.ssl.cert} ${service.ssl.key}
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
environment = {
|
||||
systemPackages = builtins.attrValues {
|
||||
inherit (pkgs)
|
||||
hledger
|
||||
hledger-ui
|
||||
;
|
||||
};
|
||||
};
|
||||
|
||||
users = {
|
||||
users.${service.name} = {
|
||||
isSystemUser = true;
|
||||
group = service.name;
|
||||
home = service.paths.path0;
|
||||
};
|
||||
groups.${service.name} = { };
|
||||
};
|
||||
|
||||
fileSystems."/var/lib/${service.name}" = {
|
||||
device = service.paths.path0;
|
||||
fsType = "none";
|
||||
options = [
|
||||
"bind"
|
||||
];
|
||||
depends = [
|
||||
server.storage0.mount
|
||||
];
|
||||
};
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"Z ${service.paths.path0} 0755 ${service.name} ${service.name} -"
|
||||
];
|
||||
|
||||
networking = {
|
||||
firewall = {
|
||||
allowedTCPPorts = [
|
||||
service.ports.port0
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue