mirror of
https://git.lgmrszd.xyz/Lgmrszd/nix-cfg.git
synced 2024-11-22 03:07:56 +01:00
vps1: reorganize data a bit
This commit is contained in:
parent
2f1cf4f40e
commit
e158c95133
5 changed files with 15 additions and 8 deletions
|
@ -1,6 +1,6 @@
|
||||||
{ pkgs, config, data, ... }:
|
{ pkgs, config, data, ... }:
|
||||||
let
|
let
|
||||||
inherit (data.services) rootDomain;
|
inherit (data.host) rootDomain;
|
||||||
gtnhDomain = "gtnh.${rootDomain}";
|
gtnhDomain = "gtnh.${rootDomain}";
|
||||||
discDomain = "discourse.testdrive.${rootDomain}";
|
discDomain = "discourse.testdrive.${rootDomain}";
|
||||||
akkoDomain = "akko429164.testdrive.${rootDomain}";
|
akkoDomain = "akko429164.testdrive.${rootDomain}";
|
||||||
|
|
|
@ -1,3 +1,12 @@
|
||||||
{
|
let
|
||||||
|
host = builtins.fromTOML (builtins.readFile ./host.toml);
|
||||||
|
rootDomain = host.rootDomain;
|
||||||
services = builtins.fromTOML (builtins.readFile ./services.toml);
|
services = builtins.fromTOML (builtins.readFile ./services.toml);
|
||||||
|
in
|
||||||
|
{
|
||||||
|
inherit host;
|
||||||
|
services = builtins.mapAttrs (name: values:
|
||||||
|
values //
|
||||||
|
(if values ? subdomain then {domain = "${values.subdomain}.${rootDomain}";} else {})
|
||||||
|
) services;
|
||||||
}
|
}
|
1
hosts/vps1/data/host.toml
Normal file
1
hosts/vps1/data/host.toml
Normal file
|
@ -0,0 +1 @@
|
||||||
|
rootDomain = "lgmrszd.xyz"
|
|
@ -1,5 +1,3 @@
|
||||||
rootDomain = "lgmrszd.xyz"
|
|
||||||
|
|
||||||
[git]
|
[git]
|
||||||
subdomain = "git"
|
subdomain = "git"
|
||||||
sshPort = 22631
|
sshPort = 22631
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
# Big thanks to Pyrox for their config! https://git.pyrox.dev/pyrox/nix/src/branch/main/hosts/marvin/services/git.nix
|
# Big thanks to Pyrox for their config! https://git.pyrox.dev/pyrox/nix/src/branch/main/hosts/marvin/services/git.nix
|
||||||
{ lib, pkgs, config, data, ... }:
|
{ lib, pkgs, config, data, ... }:
|
||||||
let
|
let
|
||||||
inherit (data.services) rootDomain;
|
inherit (data.host) rootDomain;
|
||||||
domain = "${data.services.git.subdomain}.${rootDomain}";
|
inherit (data.services.git) domain sshPort;
|
||||||
gitSSHPort = data.services.git.sshPort;
|
|
||||||
|
|
||||||
cfg = config.services.forgejo;
|
cfg = config.services.forgejo;
|
||||||
srv = cfg.settings.server;
|
srv = cfg.settings.server;
|
||||||
|
@ -40,7 +39,7 @@ in
|
||||||
ROOT_URL = "https://${srv.DOMAIN}/";
|
ROOT_URL = "https://${srv.DOMAIN}/";
|
||||||
HTTP_ADDR = "127.0.0.1";
|
HTTP_ADDR = "127.0.0.1";
|
||||||
HTTP_PORT = 3001;
|
HTTP_PORT = 3001;
|
||||||
SSH_PORT = gitSSHPort;
|
SSH_PORT = sshPort;
|
||||||
};
|
};
|
||||||
DEFAULT = {
|
DEFAULT = {
|
||||||
APP_NAME = "Lgmrszd's git";
|
APP_NAME = "Lgmrszd's git";
|
||||||
|
|
Loading…
Reference in a new issue