diff --git a/nixos/mirai/services/caddy.nix b/nixos/mirai/services/caddy.nix index 7c287d7a..d1143356 100644 --- a/nixos/mirai/services/caddy.nix +++ b/nixos/mirai/services/caddy.nix @@ -1,11 +1,14 @@ -{...}: { +{ + pkgs, + lib, + ... +}: { services = { caddy = { enable = true; - # virtualHosts = { - # "home.darksailor.dev".extraConfig = '' - # reverse_proxy http://tsuba.lemur-newton.ts.net:8123 - # ''; + # package = pkgs.caddy.withPlugins { + # plugins = ["github.com/caddy-dns/hetzner@c1104f8d1e376a062bce86cd53025c2187a6be45"]; + # hash = "sha256-9ea0CfOHG7JhejB73HjfXQpnonn+ZRBqLNz1fFRkcDQ="; # }; }; }; diff --git a/nixos/mirai/services/default.nix b/nixos/mirai/services/default.nix index 0d24aaee..02f89f78 100644 --- a/nixos/mirai/services/default.nix +++ b/nixos/mirai/services/default.nix @@ -9,6 +9,7 @@ ./caddy.nix ./fail2ban.nix ./gitea.nix + ./homepage.nix # ./nextcloud.nix # ./navidrome.nix diff --git a/nixos/mirai/services/gitea.nix b/nixos/mirai/services/gitea.nix index c43a4580..71a201de 100644 --- a/nixos/mirai/services/gitea.nix +++ b/nixos/mirai/services/gitea.nix @@ -8,6 +8,11 @@ ENABLE_REVERSE_PROXY_AUTHENTICATION = true; ENABLE_REVERSE_PROXY_AUTO_REGISTRATION = true; }; + mailer = { + ENABLED = true; + PROTOCOL = "sendmail"; + # SENDMAIL_PATH = "sendmail"; + }; security = { REVERSE_PROXY_AUTHENTICATION_USER = "REMOTE-USER"; }; diff --git a/nixos/mirai/services/homepage.nix b/nixos/mirai/services/homepage.nix new file mode 100644 index 00000000..5976864f --- /dev/null +++ b/nixos/mirai/services/homepage.nix @@ -0,0 +1,94 @@ +{...}: { + services = { + homepage-dashboard = { + enable = true; + allowedHosts = "dashboard.darksailor.dev"; + settings = { + title = "Servius' Dashboard"; + description = "A collection of services and links for quick access."; + }; + widgets = [ + { + resources = { + cpu = true; + disk = "/"; + memory = true; + }; + } + ]; + services = [ + { + "Tsuba" = [ + { + "Jellyfin" = { + description = "Jellyfin Media Server"; + href = "https://jellyfin.tsuba.darksailor.dev"; + }; + } + { + "Sonarr" = { + description = "Sonarr"; + href = "https://sonarr.tsuba.darksailor.dev"; + }; + } + { + "Radarr" = { + description = "Radarr"; + href = "https://radarr.tsuba.darksailor.dev"; + }; + } + { + "Deluge" = { + description = "Deluge"; + href = "https://deluge.tsuba.darksailor.dev"; + }; + } + { + "Jackett" = { + description = "Jackett"; + href = "https://jackett.tsuba.darksailor.dev"; + }; + } + { + "Home Assistant" = { + description = "Home Automation"; + href = "https://home.darksailor.dev"; + }; + } + ]; + } + { + "Mirai" = [ + { + "Gitea" = { + description = "Gitea Code Hosting"; + href = "https://git.darksailor.dev"; + }; + } + { + "Nextcloud" = { + description = "Nextcloud Cloud Storage"; + href = "https://cloud.darksailor.dev"; + }; + } + { + "Open WebUI" = { + description = "Open WebUI for self hosted llms"; + href = "https://llama.darksailor.dev"; + }; + } + ]; + } + ]; + }; + caddy = { + virtualHosts."dashboard.darksailor.dev".extraConfig = '' + forward_auth localhost:5555 { + uri /api/authz/forward-auth + copy_headers Remote-User Remote-Groups Remote-Email Remote-Name + } + reverse_proxy localhost:8082 + ''; + }; + }; +} diff --git a/nixos/mirai/services/nextcloud.nix b/nixos/mirai/services/nextcloud.nix index 39347fc3..cea9081d 100644 --- a/nixos/mirai/services/nextcloud.nix +++ b/nixos/mirai/services/nextcloud.nix @@ -10,10 +10,10 @@ nextcloud = { enable = true; package = pkgs.nextcloud30; - # extraApps = { - # inherit (config.services.nextcloud.package.packages.apps) news contacts calendar; - # }; - # extraAppsEnable = true; + extraApps = { + inherit (config.services.nextcloud.package.packages.apps) news contacts calendar; + }; + extraAppsEnable = true; hostName = "cloud.darksailor.dev"; config.adminuser = "servius"; config.adminpassFile = config.sops.secrets."nextcloud/adminpass".path;