blob: 9ae8cac552052bf2db9a1d7e0679e093bb40be7c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
|
{ config, lib, pkgs, ... }:
{
imports = [
# TODO auto-load config
<fysiweb/configs>
<fysiweb/configs/hcloud>
../../configs
# TODO auto-load modules
../../modules/abuilder
../../modules/agame
../../modules/fysiweb-capabilities
../../modules/fysiweb-secrets
];
config = lib.mkMerge [
{
networking.hostName = "system1";
}
# enable static users
{
fysiweb-apps.public.static-users.public.users.aforemny.publicKeyFiles = [ (toString ../../public + "/aforemny.id_rsa.pub") ];
fysiweb-apps.public.static-users.public.users.kirchner.publicKeyFiles = [
(toString ../../public + "/kirchner.id_rsa.pub")
(toString ../../public + "/kirchner@hereon.id_rsa.pub")
(toString ../../public + "/kirchner@hereon-laptop.id_rsa.pub")
];
fysiweb-apps.public.static-users.public.users.kmein.publicKeyFiles = [ (toString ../../public + "/kmein.id_ed25519.pub") ];
}
# enable authelia
{
fysiweb-apps.public.authelia.public.domain = "auth.nomath.org";
fysiweb-apps.public.authelia.public.users = config.fysiweb.capabilities.password-credentials.public-static-users-public;
}
# enable static website "nomath.org"
{
fysiweb-apps.public.static-website."nomath-org".domain = "nomath.org";
fysiweb-apps.public.static-website."nomath-org".root = "/var/lib/abuilder/nomath-org/main";
}
# enable static website "static.nomath.org"
{
fysiweb-apps.public.static-website."static-nomath-org".cors = "*";
fysiweb-apps.public.static-website."static-nomath-org".domain = "static.nomath.org";
fysiweb-apps.public.static-website."static-nomath-org".root = "/var/lib/abuilder/static-nomath-org/main";
}
# enable cgit "code.nomath.org"
{
fysiweb-apps.public.cgit."code-nomath-org".domain = "code.nomath.org";
fysiweb-apps.public.cgit."code-nomath-org".users = config.fysiweb.capabilities.ssh-credentials.public-static-users-public;
}
{
fysiweb-apps.public.cgit."code-nomath-org".repositories."abuilder".description = "simple build daemon";
fysiweb-apps.public.cgit."code-nomath-org".repositories."acms".description = "semantically versioned content management system";
fysiweb-apps.public.cgit."code-nomath-org".repositories."autotypes".description = "TODO";
fysiweb-apps.public.cgit."code-nomath-org".repositories."agame".description = "a game";
fysiweb-apps.public.cgit."code-nomath-org".repositories."anissue".description = "in-source issue management";
fysiweb-apps.public.cgit."code-nomath-org".repositories."apaperless".description = "document archival system";
fysiweb-apps.public.cgit."code-nomath-org".repositories."astatusbar".description = "simple statusbar";
fysiweb-apps.public.cgit."code-nomath-org".repositories."feed-nomath-org".description = "development feed";
fysiweb-apps.public.cgit."code-nomath-org".repositories."infra".description = "nomath.org infrastructure";
fysiweb-apps.public.cgit."code-nomath-org".repositories."json2sql".description = "simple storage system";
fysiweb-apps.public.cgit."code-nomath-org".repositories."nomath-org".description = "nomath.org website";
fysiweb-apps.public.cgit."code-nomath-org".repositories."sensors".description = "sensors";
fysiweb-apps.public.cgit."code-nomath-org".repositories."sh".description = "convenient shell processes in Haskell";
fysiweb-apps.public.cgit."code-nomath-org".repositories."static-nomath-org".description = "static.nomath.org website";
}
{
fysiweb-apps.public.cgit."code-nomath-org".settings.css = "https://static.nomath.org/cgit.css";
fysiweb-apps.public.cgit."code-nomath-org".settings.logo = "https://static.nomath.org/logo_cgit.png";
fysiweb-apps.public.cgit."code-nomath-org".settings.max-stats = "year";
fysiweb-apps.public.cgit."code-nomath-org".settings.root-desc = "";
fysiweb-apps.public.cgit."code-nomath-org".settings.root-title = "code.nomath.org";
}
# enable "feed.nomath.org"
{
fysiweb-apps.public.feed-nomath-org.feed-nomath-org.domain = "feed.nomath.org";
# TODO connect with cgit repositories
fysiweb-apps.public.feed-nomath-org.feed-nomath-org.repositories = [
"/var/lib/git/abuilder"
"/var/lib/git/acms"
"/var/lib/git/agame"
"/var/lib/git/anissue"
"/var/lib/git/apaperless"
"/var/lib/git/astatusbar"
"/var/lib/git/feed-nomath-org"
"/var/lib/git/infra"
"/var/lib/git/json2sql"
"/var/lib/git/nomath-org"
"/var/lib/git/sensors"
"/var/lib/git/sh"
"/var/lib/git/static-nomath-org"
];
}
# enable abuilder
{
# TODO add abuilder fysiweb app
services.abuilder.enable = true;
services.abuilder.repositories = [
"/var/lib/git/nomath-org"
"/var/lib/git/static-nomath-org"
];
}
# enable grafana
{
fysiweb-apps.public.grafana.grafana-nomath-org.domain = "grafana.nomath.org";
}
# enable agame server
{
services.agame.enable = true;
systemd.services.agame.wantedBy = pkgs.lib.mkForce [ ];
}
# enable minecraft server
{
services.minecraft-server.enable = true;
services.minecraft-server.eula = true;
services.minecraft-server.openFirewall = true;
services.minecraft-server.declarative = true;
services.minecraft-server.package = (import (import ../../nix/sources.nix).nixpkgs_latest {
config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "minecraft-server" ];
}).pkgs.minecraft-server;
services.minecraft-server.serverProperties.difficulty = 3;
services.minecraft-server.serverProperties.motd = config.services.minecraft-server.package.version;
services.minecraft-server.serverProperties.enforce-whitelist = true;
services.minecraft-server.serverProperties.white-list = true;
services.minecraft-server.serverProperties.view-distance = 16;
services.minecraft-server.whitelist.Alsbach = "9e479252-1c7d-45dc-a6ba-5fb8b659af86";
services.minecraft-server.whitelist.elbueblo = "3d0afb8e-3289-4b18-90c6-e113eb636e5b";
}
];
}
|