server: disabled matrix; added basic coder setup

This commit is contained in:
Jurn Wubben 2025-08-21 23:35:46 +02:00
parent ebfa21a556
commit 45e23683bf
6 changed files with 46 additions and 4 deletions

36
system/server/coder.nix Normal file
View file

@ -0,0 +1,36 @@
{
config,
lib,
pkgs,
...
}: let
inherit (config.niksos) server;
port = 9005;
host = "coder.jsw.tf";
httpsHost = "https://" + host;
in {
config = lib.mkIf server {
services = {
caddy.virtualHosts."${host}".extraConfig = ''
reverse_proxy :${port}
'';
coder = {
enable = true;
listenAddress = "127.0.0.1:${port}";
wildcardAccessUrl = "*.${host}";
accessUrl = httpsHost;
environment = {
file = ./file.file; # See format below.
/*
CODER_OIDC_CLIENT_ID=""
CODER_OIDC_CLIENT_SECRET=""
*/
extra = {
CODER_OIDC_ISSUER_URL = "https://z.jsw.tf";
# CODER_OIDC_EMAIL_DOMAIN="your-domain-1,your-domain-2";
};
};
};
};
};
}

View file

@ -1,16 +1,17 @@
{lib, ...}: {
imports = [
# ./matrix.nix
./bot.nix
./caddy.nix
./coder.nix
./derekBot.nix
./forgejo.nix
./immich.nix
./index
./mail.nix
./matrix.nix
./nextcloud.nix
./temp.nix
./zitadel.nix
./nextcloud.nix
];
options.niksos.server = lib.mkEnableOption "server servcies (such as caddy)."; #TODO: per service option.
}

View file

@ -8,7 +8,7 @@
host = "cloud.jsw.tf";
nginxRoot = config.services.nginx.virtualHosts.${host}.root;
fpmSocket = config.services.phpfpm.pools.nextcloud.socket;
imaginaryPort = 9005;
imaginaryPort = 9004;
in {
config = lib.mkIf server {
users.groups.nextcloud.members = ["nextcloud" "caddy"];