2024-01-06 01:19:35 +01:00
|
|
|
# SPDX-FileCopyrightText: 2022-2024 Simon Bruder <simon@sbruder.de>
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
|
2022-03-25 21:49:08 +01:00
|
|
|
{ pkgs, ... }:
|
|
|
|
|
2022-03-23 15:03:08 +01:00
|
|
|
{
|
|
|
|
imports = [
|
|
|
|
./hardware-configuration.nix
|
|
|
|
../../modules
|
2022-03-23 17:15:28 +01:00
|
|
|
|
2022-06-27 14:45:48 +02:00
|
|
|
./services/buchborgen.nix
|
2022-03-26 14:39:47 +01:00
|
|
|
./services/coturn.nix
|
2022-03-25 20:30:03 +01:00
|
|
|
./services/element-web.nix
|
2023-12-10 15:36:11 +01:00
|
|
|
./services/forgejo.nix
|
2022-03-25 21:49:08 +01:00
|
|
|
./services/grafana.nix
|
2022-03-23 17:27:55 +01:00
|
|
|
./services/hedgedoc.nix
|
2022-03-23 17:50:43 +01:00
|
|
|
./services/invidious
|
2024-04-28 11:38:51 +02:00
|
|
|
./services/mastodon.nix
|
2022-03-25 21:49:08 +01:00
|
|
|
./services/matrix
|
2022-07-16 19:52:40 +02:00
|
|
|
./services/password-hash-self-service.nix
|
2022-03-25 21:49:08 +01:00
|
|
|
./services/prometheus.nix
|
2022-03-23 17:50:43 +01:00
|
|
|
./services/sbruder.xyz
|
2022-04-09 10:10:08 +02:00
|
|
|
./services/schabernack.nix
|
2022-03-23 15:03:08 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
sbruder = {
|
|
|
|
nginx.hardening.enable = true;
|
2024-08-22 16:13:13 +02:00
|
|
|
restic = {
|
2024-01-10 21:27:42 +01:00
|
|
|
enable = true;
|
2024-08-22 16:13:13 +02:00
|
|
|
backups.system.enable = true;
|
2024-01-10 21:27:42 +01:00
|
|
|
};
|
2022-03-23 15:03:08 +01:00
|
|
|
wireguard.home.enable = true;
|
2024-01-03 12:04:26 +01:00
|
|
|
infovhost.enable = true;
|
2024-01-27 17:22:53 +01:00
|
|
|
wkd = {
|
|
|
|
enable = true;
|
|
|
|
};
|
2022-03-23 15:03:08 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
networking.hostName = "renge";
|
|
|
|
|
2023-12-31 12:54:51 +01:00
|
|
|
system.stateVersion = "23.11";
|
2022-03-23 15:03:08 +01:00
|
|
|
|
|
|
|
services.nginx = {
|
|
|
|
enable = true;
|
|
|
|
|
2022-03-25 21:49:08 +01:00
|
|
|
virtualHosts."sbruder.de" = {
|
|
|
|
enableACME = true;
|
|
|
|
forceSSL = true;
|
|
|
|
|
|
|
|
root = pkgs.sbruder.contact;
|
|
|
|
};
|
2022-03-23 15:03:08 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
networking.firewall.allowedTCPPorts = [
|
|
|
|
80
|
|
|
|
443
|
|
|
|
];
|
2022-03-23 17:16:00 +01:00
|
|
|
|
2023-12-31 12:54:51 +01:00
|
|
|
services.postgresql = {
|
|
|
|
enable = true;
|
|
|
|
package = pkgs.postgresql_16;
|
|
|
|
};
|
|
|
|
|
2022-03-23 17:16:00 +01:00
|
|
|
services.postgresqlBackup = {
|
|
|
|
enable = true;
|
|
|
|
startAt = [ ]; # triggered by restic system backup
|
|
|
|
location = "/var/lib/postgresql-backup";
|
2022-12-13 09:59:31 +01:00
|
|
|
compression = "none";
|
2022-03-23 17:16:00 +01:00
|
|
|
};
|
|
|
|
systemd.services.restic-backups-system = {
|
|
|
|
after = [ "postgresqlBackup.service" ];
|
|
|
|
wants = [ "postgresqlBackup.service" ];
|
|
|
|
};
|
2022-03-23 15:03:08 +01:00
|
|
|
}
|