Compare commits

...

42 commits

Author SHA1 Message Date
Nick
ba7b722d33 feat: nextcloud test 2025-06-09 04:55:43 -05:00
Nick
63abc7b765 feat: nextcloud test 2025-06-09 04:54:32 -05:00
Nick
54c7207931 feat: nextcloud test 2025-06-09 04:53:18 -05:00
Nick
3d7deb2d16 feat: nextcloud test 2025-06-09 04:37:54 -05:00
Nick
64c6a2c25c feat: nextcloud test 2025-06-09 04:35:07 -05:00
Nick
07cd42eb03 feat: nextcloud test 2025-06-09 04:32:50 -05:00
Nick
b2327a6651 feat: nextcloud test 2025-06-09 04:25:52 -05:00
Nick
9b497a5078 feat: nextcloud test 2025-06-09 04:24:29 -05:00
Nick
90d50b2757 feat: nextcloud test 2025-06-09 04:18:38 -05:00
Nick
21ff52ad7d feat: nextcloud test 2025-06-09 04:10:11 -05:00
Nick
a4e6bb82c6 feat: nextcloud test 2025-06-09 04:07:13 -05:00
Nick
dc20dde91c feat: nextcloud test 2025-06-09 04:02:39 -05:00
Nick
300cb132bc feat: nextcloud test 2025-06-09 03:56:22 -05:00
Nick
26bbd1f5ee feat: nextcloud test 2025-06-09 03:41:07 -05:00
Nick
c3a6be41d3 feat: nextcloud test 2025-06-09 03:38:56 -05:00
Nick
ab254d473d feat: nextcloud test 2025-06-09 03:36:29 -05:00
Nick
efd73253e2 feat: nextcloud test 2025-06-09 03:34:13 -05:00
Nick
7e6a670bb4 feat: nextcloud test 2025-06-09 03:31:21 -05:00
Nick
f0f02d1538 feat: nextcloud test 2025-06-09 03:27:26 -05:00
Nick
dcc77642aa feat: nextcloud test 2025-06-09 03:26:01 -05:00
Nick
3c2f96baa5 feat: nextcloud test 2025-06-09 03:23:19 -05:00
Nick
ee2f20c6ad feat: nextcloud test 2025-06-09 03:08:05 -05:00
Nick
f664c6142b feat: nextcloud test 2025-06-09 03:04:37 -05:00
Nick
1d1afd49cc feat: nextcloud test 2025-06-09 02:32:50 -05:00
Nick
b4ffe57f6a feat: nextcloud test 2025-06-09 02:29:45 -05:00
Nick
5d981ba6ee feat: nextcloud test 2025-06-09 02:24:08 -05:00
Nick
c6f5c7cdad feat: nextcloud test 2025-06-09 02:22:57 -05:00
Nick
5fc36f05f7 feat: nextcloud test 2025-06-09 02:18:16 -05:00
Nick
6e7ccc32b1 feat: nextcloud test 2025-06-09 02:12:22 -05:00
Nick
f8f538acd9 feat: nextcloud test 2025-06-09 02:07:27 -05:00
Nick
6693bc981d feat: kanboard removed 2025-06-09 01:25:32 -05:00
Nick
2b0ab1d538 feat: kanboard test 2025-06-09 01:12:16 -05:00
Nick
6b4e499a3a feat: kanboard test 2025-06-09 01:08:23 -05:00
Nick
e8f8c44dcb feat: kanboard test 2025-06-09 00:56:44 -05:00
Nick
95c4e903ad feat: kanboard test 2025-06-09 00:52:05 -05:00
Nick
16cb28a20e feat: kanboard test 2025-06-09 00:50:17 -05:00
Nick
25566608ec feat: kanboard test 2025-06-09 00:49:28 -05:00
Nick
4fe55f07ea feat: kanboard test 2025-06-09 00:47:17 -05:00
Nick
e9fc51face feat: test 2025-06-09 00:32:23 -05:00
Nick
d4e51acad4 feat: test 2025-06-09 00:13:34 -05:00
Nick
f5dcb24bde feat: test 2025-06-08 23:56:11 -05:00
Nick
34766782ba feat: test 2025-06-08 23:36:11 -05:00
13 changed files with 57 additions and 150 deletions

View file

@ -1,34 +0,0 @@
{ instancesFunctions }:
let
inherit (instancesFunctions)
domain0
servicePath
sslPath
sopsPath
;
kanboardLabel = "Kanboard";
kanboardName = "kanboard";
kanboardSubdomain = "todo";
in
{
label = kanboardLabel;
name = kanboardName;
email = {
address0 = "noreply@${domain0}";
};
sops = {
path0 = "${sopsPath}/${kanboardName}";
};
subdomain = kanboardSubdomain;
paths = {
path0 = "${servicePath}/${kanboardLabel}";
};
ports = {
port0 = 3434;
};
ssl = {
cert = "${sslPath}/${kanboardSubdomain}.${domain0}/fullchain.pem";
key = "${sslPath}/${kanboardSubdomain}.${domain0}/key.pem";
};
}

View file

@ -1,7 +1,7 @@
{ instancesFunctions }: { instancesFunctions }:
let let
inherit (instancesFunctions) inherit (instancesFunctions)
domain1 domain0
servicePath servicePath
sslPath sslPath
sopsPath sopsPath
@ -13,6 +13,9 @@ in
{ {
label = nextcloudLabel; label = nextcloudLabel;
name = nextcloudName; name = nextcloudName;
email = {
address0 = "noreply@${nextcloudName}.${domain0}";
};
sops = { sops = {
path0 = "${sopsPath}/${nextcloudName}"; path0 = "${sopsPath}/${nextcloudName}";
}; };
@ -24,7 +27,7 @@ in
port0 = 8354; # Nextcloud port0 = 8354; # Nextcloud
}; };
ssl = { ssl = {
cert = "${sslPath}/${nextcloudName}.${domain1}/fullchain.pem"; cert = "${sslPath}/${nextcloudName}.${domain0}/fullchain.pem";
key = "${sslPath}/${nextcloudName}.${domain1}/key.pem"; key = "${sslPath}/${nextcloudName}.${domain0}/key.pem";
}; };
} }

View file

@ -0,0 +1,19 @@
{ instancesFunctions }:
let
inherit (instancesFunctions)
sopsPath
;
nginxLabel = "Nginx";
nginxName = "nginx";
in
{
label = nginxLabel;
name = nginxName;
sops = {
path0 = "${sopsPath}/${nginxName}";
};
ports = {
port0 = 8080;
};
}

View file

@ -89,7 +89,7 @@ in
vaultwarden vaultwarden
forgejo forgejo
xserver xserver
# kanboard nextcloud
; ;
}; };
}; };

View file

@ -35,10 +35,10 @@ in
"jellyfin" "jellyfin"
"minecraft" "minecraft"
"ollama" "ollama"
"nextcloud"
"syncthing" "syncthing"
"searx" "searx"
"vaultwarden" "vaultwarden"
"kanboard"
"audiobookshelf" "audiobookshelf"
] ]
) )

View file

@ -2,7 +2,7 @@
let let
widgetsPath = ./widgets; widgetsPath = ./widgets;
widgets = { widgets = {
jellyfin = import (widgetsPath + /jellyfin) { inherit config flake; }; jellyfin = import (widgetsPath + /jelly) { inherit config flake; };
steam = import (widgetsPath + /steam); steam = import (widgetsPath + /steam);
podcasts = import (widgetsPath + /podcasts.nix); podcasts = import (widgetsPath + /podcasts.nix);
calendar = import (widgetsPath + /calendar.nix); calendar = import (widgetsPath + /calendar.nix);

3
modules/nixos/services/jellyfin/default.nix Normal file → Executable file
View file

@ -1,6 +1,5 @@
{ config, ... }: { flake, ... }:
let let
flake = config.flake;
inherit (flake.config.people) user0; inherit (flake.config.people) user0;
inherit (flake.config.machines.devices) ceres; inherit (flake.config.machines.devices) ceres;
inherit (flake.config.services.instances) jellyfin web; inherit (flake.config.services.instances) jellyfin web;

View file

@ -1,93 +0,0 @@
{
flake,
config,
...
}:
let
inherit (flake.config.machines.devices)
ceres
;
inherit (flake.config.services.instances) smtp kanboard web;
service = kanboard;
localhost = web.localhost.address0;
host = "${service.subdomain}.${web.domains.url0}";
in
{
services = {
kanboard = {
enable = true;
dataDir = "/var/lib/${service.name}";
settings = {
HTTP_PROXY_HOSTNAME = host;
HTTP_PROXY_PORT = service.ports.port0;
MAIL_SMTP_HOSTNAME = smtp.hostname;
MAIL_TRANSPORT = "smtp";
MAIL_SMTP_PORT = smtp.ports.port0;
MAIL_SMTP_USERNAME = service.email.address0;
MAIL_FROM = service.email.address0;
MAIL_SMTP_PASSWORD = config.sops.secrets."${service.name}-smtp".path;
MAIL_SMTP_ENCRYPTION = "tls";
};
};
caddy = {
virtualHosts = {
"${host}" = {
extraConfig = ''
reverse_proxy ${localhost}:${toString service.ports.port0}
tls ${service.ssl.cert} ${service.ssl.key}
'';
};
};
};
};
sops =
let
sopsPath = secret: {
path = "${service.sops.path0}/${service.name}-${secret}";
owner = service.name;
mode = "600";
};
in
{
secrets = builtins.listToAttrs (
map
(secret: {
name = "${service.name}-${secret}";
value = sopsPath secret;
})
[
"smtp"
]
);
};
fileSystems."/var/lib/${service.name}" = {
device = service.paths.path0;
fsType = "none";
options = [
"bind"
];
depends = [
ceres.storage0.mount
];
};
systemd.tmpfiles.rules = [
"Z ${service.paths.path0} 755 ${service.name} ${service.name} -"
"Z ${service.sops.path0} 755 ${service.name} ${service.name} -"
];
users.users.${service.name}.extraGroups = [
"caddy"
"postgres"
];
networking = {
firewall = {
allowedTCPPorts = [
service.ports.port0
];
};
};
}

View file

@ -4,12 +4,8 @@
... ...
}: }:
let let
inherit (flake.config.machines.devices) inherit (flake.config.machines.devices) ceres;
ceres inherit (flake.config.services.instances) minecraft;
;
inherit (flake.config.services.instances)
minecraft
;
service = minecraft; service = minecraft;
in in
{ {

View file

@ -8,10 +8,15 @@ let
inherit (flake.config.people) user0; inherit (flake.config.people) user0;
inherit (flake.config.people.users.${user0}) name; inherit (flake.config.people.users.${user0}) name;
inherit (flake.config.machines.devices) ceres; inherit (flake.config.machines.devices) ceres;
inherit (flake.config.services.instances) nextcloud nginx web; inherit (flake.config.services.instances)
nextcloud
nginx
smtp
web
;
service = nextcloud; service = nextcloud;
localhost = web.localhost.address0; localhost = web.localhost.address0;
host = "${service.subdomain}.${web.domains.url1}"; host = "${service.subdomain}.${web.domains.url0}";
in in
{ {
services = { services = {
@ -22,13 +27,14 @@ in
enable = true; enable = true;
hostName = host; hostName = host;
https = true; https = true;
package = pkgs.nextcloud30; package = pkgs.nextcloud31;
phpOptions."opcache.interned_strings_buffer" = "24"; phpOptions."opcache.interned_strings_buffer" = "24";
extraAppsEnable = true; extraAppsEnable = true;
extraApps = { extraApps = {
inherit (config.services.service.package.packages.apps) inherit (pkgs.nextcloud31Packages.apps)
contacts contacts
calendar calendar
deck
; ;
}; };
config = { config = {
@ -42,8 +48,17 @@ in
settings = { settings = {
default_phone_region = "CA"; default_phone_region = "CA";
log_type = "file"; log_type = "file";
mail_sendmailmode = "pipe"; mail_domain = host;
mail_smtpmode = "sendmail"; mail_from_address = "noreply";
mail_sendmailmode = "smtp";
mail_smtpmode = "smtp";
mail_smtphost = smtp.hostname;
mail_smtpport = smtp.ports.port0;
mail_smtpsecure = "";
mail_smtptimeout = 30;
mail_smtpauth = 1;
mail_smtpname = service.email.address0;
mail_smtppassword = config.sops.secrets."${service.name}-smtp".path;
maintenance_window_start = 4; maintenance_window_start = 4;
overwriteprotocol = "https"; overwriteprotocol = "https";
trusted_proxies = [ trusted_proxies = [
@ -92,6 +107,7 @@ in
}) })
[ [
"pass" "pass"
"smtp"
] ]
); );
}; };
@ -109,6 +125,7 @@ in
systemd.tmpfiles.rules = [ systemd.tmpfiles.rules = [
"Z ${service.paths.path0} 750 ${service.name} ${service.name} -" "Z ${service.paths.path0} 750 ${service.name} ${service.name} -"
"Z ${service.paths.path0}/config 750 ${service.name} ${service.name} -"
"Z ${service.sops.path0} 750 ${service.name} ${service.name} -" "Z ${service.sops.path0} 750 ${service.name} ${service.name} -"
]; ];

View file

@ -35,7 +35,7 @@ wireguard-CA220: ENC[AES256_GCM,data:rNy/IMKqAOsgMUu5r8BZsjTCu0L5fDDDV3/g+pkhW1y
wireguard-CA358: ENC[AES256_GCM,data:/VewmiNfRc9/wSE7TT+z1F9LLIvr/5wPsQZ/zBwAh3dEi9yswOGyde2b/XQ=,iv:7U5dmqFiwhCoL1moGSfHprv85o5TdMr6T2sNk5gH82I=,tag:T1hqh8CiO2iBa+ksaiKCtA==,type:str] wireguard-CA358: ENC[AES256_GCM,data:/VewmiNfRc9/wSE7TT+z1F9LLIvr/5wPsQZ/zBwAh3dEi9yswOGyde2b/XQ=,iv:7U5dmqFiwhCoL1moGSfHprv85o5TdMr6T2sNk5gH82I=,tag:T1hqh8CiO2iBa+ksaiKCtA==,type:str]
wireguard-CA627: ENC[AES256_GCM,data:chmDsH2nE0nagjFRZWuxX08/Ykt+rIgCHYkMHd+7nIqihK5SebF7MJlrp84=,iv:NVOlGE7W70nQ0UM/i5WixJvDULO3Y4cLf8h+OAGHhQQ=,tag:L123ShCnr9+kIg1itIoqBA==,type:str] wireguard-CA627: ENC[AES256_GCM,data:chmDsH2nE0nagjFRZWuxX08/Ykt+rIgCHYkMHd+7nIqihK5SebF7MJlrp84=,iv:NVOlGE7W70nQ0UM/i5WixJvDULO3Y4cLf8h+OAGHhQQ=,tag:L123ShCnr9+kIg1itIoqBA==,type:str]
glance-jellyfin: ENC[AES256_GCM,data:ozdDKgAWkA88J2j8RtiOP/aQPAt/neUOSlAZF20g510=,iv:x+VhYlnA9F/VPrzVcma4/oPelCc8kjWoTZvOs4L9Uqo=,tag:crdSDjr8Y5GH/JAF6t8Yeg==,type:str] glance-jellyfin: ENC[AES256_GCM,data:ozdDKgAWkA88J2j8RtiOP/aQPAt/neUOSlAZF20g510=,iv:x+VhYlnA9F/VPrzVcma4/oPelCc8kjWoTZvOs4L9Uqo=,tag:crdSDjr8Y5GH/JAF6t8Yeg==,type:str]
kanboard-smtp: ENC[AES256_GCM,data:FmmLEGr5Q8RHtie11Y88XQ==,iv:KtY/Bl2vpkXim7KrkK7cc5n0M0RDlxerbXu9jczj/hI=,tag:ZlbV6d1wH6KmbvHJR3Fq/w==,type:str] nextcloud-smtp: ENC[AES256_GCM,data:GbNv/pHAtPru00m5OCER8g==,iv:Q1WYLKe34VsCvP1trk6IXm46RbVFMnsq4Eb5e2MBVgk=,tag:dwmimioRlHKbZeDv3THfzQ==,type:str]
sops: sops:
age: age:
- recipient: age19dpncsdphdt2tmknjs99eghk527pvdrw0m29qjn2z2gg3et5tdtqycqhl0 - recipient: age19dpncsdphdt2tmknjs99eghk527pvdrw0m29qjn2z2gg3et5tdtqycqhl0
@ -47,7 +47,7 @@ sops:
bXBOa1VSakoyaWxpODJEOU11QUZCaUEK8Ch9Ten3DdrPHF1DTH2qei85AlHUOaLD bXBOa1VSakoyaWxpODJEOU11QUZCaUEK8Ch9Ten3DdrPHF1DTH2qei85AlHUOaLD
aNfzakake7ej+MxJYdKEU0bcWofNMKzIlZa2uM10KZSENDP8d8qlig== aNfzakake7ej+MxJYdKEU0bcWofNMKzIlZa2uM10KZSENDP8d8qlig==
-----END AGE ENCRYPTED FILE----- -----END AGE ENCRYPTED FILE-----
lastmodified: "2025-06-09T00:32:17Z" lastmodified: "2025-06-09T09:37:48Z"
mac: ENC[AES256_GCM,data:b4WMUmVOzgcz/ajxPl0OfQUGarUtnFIFS3DA9CjogPz6aVNDGWrVged5FB6UOotoqQ5RcgThewSu2HztEfCbhM0ZwZ0ak87XS8QHb++s97HhYeeh5mqgVnpsvF4Coa9aRpc2H4etuUNYFxoDojT/hTUKzg3a3QNSWzB06aKTd1A=,iv:YEJN5sakhN1rFytIDMIHpHAVYxvbt9iI2eXL2YBUYnY=,tag:SNBQWZIrXw4ptMLEqkR/xA==,type:str] mac: ENC[AES256_GCM,data:gBEfsR718Hn+GJ1wzxS3T1HOrNL659TUUq3l3nUNxbY2SxXWnnHxzdMhf2xP1/tm3Vst2MC/SjPszdbqVnVKIS1k+iwT+WSLH7OlbASku62cx9J9RKqm4PJd/2KtKR7Yaj4dU9+F7RnKtCA4N/m4ZA+BiD0oib76/Aa64tjVtDo=,iv:rJ+WfAFR8Un/u66Y2554BjDzJifQLdXNDexpl4GGClw=,tag:tY2biwFl7ywaHe3aTKjCMA==,type:str]
unencrypted_suffix: _unencrypted unencrypted_suffix: _unencrypted
version: 3.10.2 version: 3.10.2