Make ashers site work

This commit is contained in:
kalle 2025-06-11 23:39:50 +02:00
parent 30a471535a
commit 27bc5c0d2f
5 changed files with 88 additions and 72 deletions

View file

@ -13,6 +13,12 @@ rec {
target = "http://${ip}:80"; target = "http://${ip}:80";
priority = 1; priority = 1;
} }
{
name = "${hostname}-asher-portfolio";
rule = "Host(`asherdejong.nl`)";
target = "http://${ip}:80";
priority = 1;
}
{ {
name = "${hostname}-transmission"; name = "${hostname}-transmission";
rule = "Host(`transmission.kallestruik.nl`) && ClientIP(`192.168.10.0/24`)"; rule = "Host(`transmission.kallestruik.nl`) && ClientIP(`192.168.10.0/24`)";

View file

@ -1,3 +1,7 @@
let
appDataInCeph = "/appdata/forgejo";
appDir = "/cephfs${appDataInCeph}";
in
{ {
name = "Forgejo"; name = "Forgejo";
description = '' description = ''
@ -21,6 +25,8 @@
} }
]; ];
cephBackupPaths = [ appDataInCeph ];
nixosModule = nixosModule =
{ {
pkgs, pkgs,
@ -77,7 +83,7 @@
echo "No arguments supplied" echo "No arguments supplied"
exit 1 exit 1
fi fi
sudo -u forgejo -- ${lib.getExe pkgs.forgejo} --config /cephfs/appdata/forgejo/custom/conf/app.ini $@ sudo -u forgejo -- ${lib.getExe pkgs.forgejo} --config ${appDir}/custom/conf/app.ini $@
''; '';
in in
[ [
@ -92,7 +98,7 @@
services.forgejo = { services.forgejo = {
enable = true; enable = true;
package = pkgs.forgejo; package = pkgs.forgejo;
stateDir = "/cephfs/appdata/forgejo"; stateDir = appDir;
lfs.enable = true; lfs.enable = true;
database = { database = {

View file

@ -1,3 +1,8 @@
let
appDataInCeph = "/appdata/freshrss";
appDir = "/cephfs${appDataInCeph}";
dataDir = "${appDir}/data";
in
{ {
name = "FreshRSS"; name = "FreshRSS";
description = '' description = ''
@ -21,6 +26,8 @@
} }
]; ];
cephBackupPaths = [ appDataInCeph ];
nixosModule = nixosModule =
{ {
lib, lib,
@ -34,17 +41,9 @@
domain = lib.mkOption { domain = lib.mkOption {
type = lib.types.str; type = lib.types.str;
}; };
adminUser = lib.mkOption {
type = lib.types.str;
};
}; };
config = config = {
let
appDir = "/cephfs/appdata/freshrss";
dataDir = "${appDir}/data";
in
{
networking.firewall.allowedTCPPorts = [ networking.firewall.allowedTCPPorts = [
1342 # Freshrss 1342 # Freshrss
]; ];

View file

@ -115,6 +115,9 @@
dnsChallenge = { dnsChallenge = {
provider = "cloudflare"; provider = "cloudflare";
}; };
httpChallenge = {
entryPoint = "web";
};
}; };
}; };
}; };
@ -130,6 +133,7 @@
service = route.name; service = route.name;
rule = route.rule; rule = route.rule;
priority = route.priority or "0"; priority = route.priority or "0";
tls.certresolver = "letsencrypt";
}; };
}) routes }) routes
); );

View file

@ -49,6 +49,7 @@
mkRole = cfg: { mkRole = cfg: {
inherit (cfg) name description nixosModule; inherit (cfg) name description nixosModule;
traefikRoutes = cfg.traefikRoutes or ({ ... }: [ ]); traefikRoutes = cfg.traefikRoutes or ({ ... }: [ ]);
cephBackupPaths = cfg.cephBackupPaths or [ ];
}; };
mkHost = cfg: { mkHost = cfg: {