server: disabled matrix; added basic coder setup
This commit is contained in:
parent
ebfa21a556
commit
45e23683bf
6 changed files with 46 additions and 4 deletions
BIN
secrets/coder-env.age
Normal file
BIN
secrets/coder-env.age
Normal file
Binary file not shown.
|
|
@ -44,7 +44,11 @@ in {
|
||||||
};
|
};
|
||||||
nextcloud-admin-pass = mkIf server {
|
nextcloud-admin-pass = mkIf server {
|
||||||
file = ./nextcloud-admin-pass.age;
|
file = ./nextcloud-admin-pass.age;
|
||||||
owner = "nextcloud";
|
owner = "nextcloud"; #NOTE: not a clear 'nextcloud.service' or 'services.nextcloud.user'.
|
||||||
|
};
|
||||||
|
coder-env = mkIf server {
|
||||||
|
file = ./coder-env.age;
|
||||||
|
owner = abstrServiceUser "coder";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,4 +23,5 @@ in {
|
||||||
"forgejo-mailpass.age".publicKeys = keys;
|
"forgejo-mailpass.age".publicKeys = keys;
|
||||||
"immich-oidc.age".publicKeys = keys;
|
"immich-oidc.age".publicKeys = keys;
|
||||||
"nextcloud-admin-pass.age".publicKeys = keys;
|
"nextcloud-admin-pass.age".publicKeys = keys;
|
||||||
|
"coder-env.age".publicKeys = keys;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
36
system/server/coder.nix
Normal file
36
system/server/coder.nix
Normal 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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,16 +1,17 @@
|
||||||
{lib, ...}: {
|
{lib, ...}: {
|
||||||
imports = [
|
imports = [
|
||||||
|
# ./matrix.nix
|
||||||
./bot.nix
|
./bot.nix
|
||||||
./caddy.nix
|
./caddy.nix
|
||||||
|
./coder.nix
|
||||||
./derekBot.nix
|
./derekBot.nix
|
||||||
./forgejo.nix
|
./forgejo.nix
|
||||||
./immich.nix
|
./immich.nix
|
||||||
./index
|
./index
|
||||||
./mail.nix
|
./mail.nix
|
||||||
./matrix.nix
|
./nextcloud.nix
|
||||||
./temp.nix
|
./temp.nix
|
||||||
./zitadel.nix
|
./zitadel.nix
|
||||||
./nextcloud.nix
|
|
||||||
];
|
];
|
||||||
options.niksos.server = lib.mkEnableOption "server servcies (such as caddy)."; #TODO: per service option.
|
options.niksos.server = lib.mkEnableOption "server servcies (such as caddy)."; #TODO: per service option.
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
host = "cloud.jsw.tf";
|
host = "cloud.jsw.tf";
|
||||||
nginxRoot = config.services.nginx.virtualHosts.${host}.root;
|
nginxRoot = config.services.nginx.virtualHosts.${host}.root;
|
||||||
fpmSocket = config.services.phpfpm.pools.nextcloud.socket;
|
fpmSocket = config.services.phpfpm.pools.nextcloud.socket;
|
||||||
imaginaryPort = 9005;
|
imaginaryPort = 9004;
|
||||||
in {
|
in {
|
||||||
config = lib.mkIf server {
|
config = lib.mkIf server {
|
||||||
users.groups.nextcloud.members = ["nextcloud" "caddy"];
|
users.groups.nextcloud.members = ["nextcloud" "caddy"];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue