Compare commits
No commits in common. "78027e205256a5ec57d4477fb77c3822837d55fe" and "14892577264b3756213950507b765c822105e598" have entirely different histories.
78027e2052
...
1489257726
2 changed files with 1 additions and 83 deletions
|
|
@ -1,12 +1,12 @@
|
||||||
{...}: {
|
{...}: {
|
||||||
imports = [
|
imports = [
|
||||||
|
./vaultwarden.nix
|
||||||
./fail2ban.nix
|
./fail2ban.nix
|
||||||
./fava.nix
|
./fava.nix
|
||||||
./forgejo
|
./forgejo
|
||||||
./gitea
|
./gitea
|
||||||
./immich.nix
|
./immich.nix
|
||||||
./jellyfin.nix
|
./jellyfin.nix
|
||||||
./journiv.nix
|
|
||||||
./lohr.nix
|
./lohr.nix
|
||||||
./matrix.nix
|
./matrix.nix
|
||||||
./mealie.nix
|
./mealie.nix
|
||||||
|
|
@ -27,6 +27,5 @@
|
||||||
./scribe.nix
|
./scribe.nix
|
||||||
./tailscale.nix
|
./tailscale.nix
|
||||||
./transmission.nix
|
./transmission.nix
|
||||||
./vaultwarden.nix
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,81 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
inherit
|
|
||||||
(lib)
|
|
||||||
mkEnableOption
|
|
||||||
mkIf
|
|
||||||
mkOption
|
|
||||||
;
|
|
||||||
|
|
||||||
cfg = config.my.services.journiv;
|
|
||||||
my = config.my;
|
|
||||||
|
|
||||||
domain = config.networking.domain;
|
|
||||||
hostname = config.networking.hostName;
|
|
||||||
fqdn = "${hostname}.${domain}";
|
|
||||||
in {
|
|
||||||
options.my.services.journiv = let
|
|
||||||
inherit (lib) types;
|
|
||||||
in {
|
|
||||||
enable = mkEnableOption "Journiv config";
|
|
||||||
|
|
||||||
home = mkOption {
|
|
||||||
type = types.str;
|
|
||||||
default = "/var/lib/journiv";
|
|
||||||
example = "/var/lib/journiv";
|
|
||||||
description = "Home for the journiv service, where data will be stored";
|
|
||||||
};
|
|
||||||
|
|
||||||
port = mkOption {
|
|
||||||
type = types.port;
|
|
||||||
default = 2342;
|
|
||||||
example = 8080;
|
|
||||||
description = "Internal port for Journiv webapp";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
users.users.journiv = {
|
|
||||||
isSystemUser = true;
|
|
||||||
home = cfg.home;
|
|
||||||
createHome = true;
|
|
||||||
group = "journiv";
|
|
||||||
};
|
|
||||||
users.groups.journiv = {};
|
|
||||||
|
|
||||||
services.nginx.virtualHosts = {
|
|
||||||
"journiv.${domain}" = {
|
|
||||||
forceSSL = true;
|
|
||||||
useACMEHost = fqdn;
|
|
||||||
|
|
||||||
locations."/" = {
|
|
||||||
proxyPass = "http://127.0.0.1:${toString cfg.port}";
|
|
||||||
proxyWebsockets = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
extraConfig = ''
|
|
||||||
proxy_connect_timeout 600;
|
|
||||||
proxy_read_timeout 600;
|
|
||||||
proxy_send_timeout 600;
|
|
||||||
client_max_body_size 500m;
|
|
||||||
access_log syslog:server=unix:/dev/log,tag=journiv;
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
security.acme.certs.${fqdn}.extraDomainNames = ["journiv.${domain}"];
|
|
||||||
|
|
||||||
# my.services.restic-backup = mkIf cfg.enable {
|
|
||||||
# paths = [
|
|
||||||
# cfg.home
|
|
||||||
# ];
|
|
||||||
# exclude = [
|
|
||||||
# "${cfg.home}/storage"
|
|
||||||
# ];
|
|
||||||
# };
|
|
||||||
};
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue