Compare commits

...

34 commits

Author SHA1 Message Date
99cdbdd49c Temporarily disable STATIC_ROOT_PATH 2025-06-19 09:41:53 +02:00
3a0538f41a Copy og templ 2025-06-19 08:56:49 +02:00
2cfa203f2c Comment home changes 2025-06-19 08:31:25 +02:00
998eafcca4 Final port definition location 2025-06-19 08:28:41 +02:00
892d10f02b Change mariadb port definition 2025-06-19 08:23:07 +02:00
0284ea30e4 New attempt to alter home page 2025-06-19 08:15:54 +02:00
176c1cc354 Merge branch 'main' of ssh://pts-paper.de:62/SCS/nixos-server-conf 2025-06-18 10:45:14 +02:00
af27a144ea Add mariadb 2025-06-18 10:44:51 +02:00
Michael Huebner
bfb0387f04 Correct path to mkdir 2025-06-16 15:18:08 +02:00
Michael Huebner
08cee5cdba Create dir first 2025-06-16 15:17:01 +02:00
Michael Huebner
225fb54687 Move to template dir 2025-06-16 15:09:28 +02:00
Michael Huebner
90bf07ec8f Explicitly name file 2025-06-16 15:01:53 +02:00
Michael Huebner
aca0456568 Test coreutils 2025-06-16 14:53:46 +02:00
Michael Huebner
54966e3417 Remove pkgs.nix from path 2025-06-16 13:26:56 +02:00
Michael Huebner
a0f6075f72 Another path fix 2025-06-16 13:25:28 +02:00
Michael Huebner
91c015972d Remove absolute path 2025-06-16 13:24:00 +02:00
Michael Huebner
26e8f736ea Extend path 2025-06-16 13:22:24 +02:00
Michael Huebner
926844cd1a Test path to cp 2025-06-16 13:11:40 +02:00
Michael Huebner
40c88117be try systemd scope 2025-06-16 13:03:11 +02:00
Michael Huebner
fa00269738 Try string type 2025-06-16 13:01:35 +02:00
Michael Huebner
2ea1173111 Another fix 2025-06-16 12:37:42 +02:00
Michael Huebner
6db578d385 Fix syntax 2025-06-16 12:37:11 +02:00
Michael Huebner
7893327136 Test custom copy 2025-06-16 12:36:36 +02:00
Michael Huebner
60eb69b118 Revert template change 2025-06-16 09:36:57 +02:00
Michael Huebner
ae856e1c9e Move forgejo package conf to correct location 2025-06-16 09:20:14 +02:00
Michael Huebner
91092c3cda Add custom template 2025-06-16 09:16:01 +02:00
Michael Huebner
0b0bae3f9d Add command line mailing tool 2025-06-16 08:19:48 +02:00
Michael Huebner
81187bf0ff Fix typo 2025-06-16 08:10:08 +02:00
Michael Huebner
36394ceaf0 Add inetutils 2025-06-16 08:08:34 +02:00
6473ce5e65 Test more extra configs 2025-06-13 09:58:50 +02:00
afe1484b0d Explicitly add smtp protocol 2025-06-13 09:43:36 +02:00
1608428cdb Remove $ from mail 2025-06-13 09:40:06 +02:00
0027951cf7 Merge branch 'main' of ssh://gavania.de:62/hodasemi/nixos-server-conf 2025-06-13 09:26:50 +02:00
311d28653f Setup smtp for forgejo 2025-06-13 09:25:48 +02:00
5 changed files with 53 additions and 8 deletions

View file

@ -44,4 +44,16 @@ in
extraGroups = [ "docker" ];
};
};
services = {
mysql = {
enable = true;
package = pkgs.mariadb;
settings = {
mysqld = {
port = 8000;
};
};
};
};
}

View file

@ -1,5 +0,0 @@
#!/bin/bash
openssl passwd -6 $1 > dev_user_password.pw
colmena apply

View file

@ -36,6 +36,11 @@ in
enableACME = true;
extraConfig = ''
client_max_body_size 512M;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
'';
locations."/".proxyPass = "http://localhost:${toString srv.HTTP_PORT}";
};
@ -51,6 +56,14 @@ in
ROOT_URL = "https://${srv.DOMAIN}";
HTTP_PORT = 3000;
SSH_PORT = 62;
# STATIC_ROOT_PATH = pkgs.runCommand "patch-templates" { } ''
# mkdir -p $out
# ${pkgs.lib.getExe' pkgs.coreutils "cp"} -r ${pkgs.forgejo.data}/* $out
# chmod u+w $out/templates/home.tmpl
# ${pkgs.lib.getExe' pkgs.coreutils "cp"} -f ${./home.tmpl} $out/templates/home.tmpl
# chmod u-w $out/templates/home.tmpl
# '';
};
service.DISABLE_REGISTRATION = true;
actions = {
@ -59,9 +72,11 @@ in
};
mailer = {
ENABLED = true;
SMTP_ADDR = "TODO";
FROM = "noreply@${srv.DOMAIN}";
USER = "noreply@${srv.DOMAIN}";
PROTOCOL = "smtp";
SMTP_ADDR = "80.151.91.109";
SMTP_PORT = 25;
FROM = "noreply@ptspaper.de";
USER = "noreply@ptspaper.de";
};
};
dump = {
@ -73,6 +88,8 @@ in
};
};
openssh = {
ports = [ 62 ];
settings = {

19
home.tmpl Normal file
View file

@ -0,0 +1,19 @@
{{template "base/head" .}}
<div role="main" aria-label="{{if .IsSigned}}{{ctx.Locale.Tr "dashboard"}}{{else}}{{ctx.Locale.Tr "home"}}{{end}}" class="page-content home">
<div class="tw-mb-8 tw-px-8">
<div class="center">
<img class="logo" width="220" height="220" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{ctx.Locale.Tr "logo"}}">
<div class="hero">
<h1 class="ui icon header title">
{{AppDisplayName}}
</h1>
<h2>{{ctx.Locale.Tr "startpage.app_desc"}}</h2>
<!-- <h2>{{ctx.Locale.Tr "startpage.app_desc"}}</h2>
<h2>Das ist der Entwicklungsserver der PTS.</h2>
<h2>Zur PTS-Website geht es <a href="https://www.ptspaper.de/de/">hier</a></h2> -->
</div>
</div>
</div>
{{template "home_forgejo" .}}
</div>
{{template "base/footer" .}}

View file

@ -20,6 +20,8 @@
environment.systemPackages = with pkgs; [
git
htop
inetutils
msmtp
];
networking.firewall = {