2024-01-06 01:19:35 +01:00
|
|
|
# SPDX-FileCopyrightText: 2021-2024 Simon Bruder <simon@sbruder.de>
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
|
2021-01-26 18:42:42 +01:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
{
|
|
|
|
imports = [
|
|
|
|
./hardware-configuration.nix
|
|
|
|
../../modules
|
|
|
|
../../users/simon
|
2021-02-24 20:55:07 +01:00
|
|
|
|
2021-04-16 17:13:46 +02:00
|
|
|
./services/media-backup.nix
|
2021-03-05 16:12:25 +01:00
|
|
|
./services/media.nix
|
2024-09-19 21:51:56 +02:00
|
|
|
./services/paperless.nix
|
2023-08-18 22:17:02 +02:00
|
|
|
./services/photoprism.nix
|
2021-02-19 18:35:44 +01:00
|
|
|
./services/torrent.nix
|
2021-01-26 18:42:42 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
sbruder = {
|
|
|
|
wireguard.home.enable = true;
|
|
|
|
nginx.hardening.enable = true;
|
2024-07-14 19:07:00 +02:00
|
|
|
printing.server.enable = true;
|
2024-08-22 16:13:13 +02:00
|
|
|
restic = {
|
2021-03-08 17:33:30 +01:00
|
|
|
enable = true;
|
2024-08-22 16:13:13 +02:00
|
|
|
backups.system = {
|
|
|
|
enable = true;
|
|
|
|
qos = true;
|
|
|
|
extraPaths = [
|
|
|
|
"/data"
|
|
|
|
];
|
|
|
|
extraExcludes = [
|
|
|
|
"/data/cold/media/video"
|
|
|
|
"/data/cold/misc"
|
|
|
|
"/data/cold/torrent"
|
|
|
|
"/data/hot/torrent"
|
|
|
|
"/data/media/video"
|
|
|
|
"/data/torrent"
|
|
|
|
];
|
|
|
|
};
|
2021-03-08 17:33:30 +01:00
|
|
|
};
|
2021-04-03 18:47:01 +02:00
|
|
|
unfree.allowSoftware = true;
|
2021-01-26 18:42:42 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
services.nginx = {
|
|
|
|
enable = true;
|
|
|
|
};
|
|
|
|
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
2021-03-01 15:27:18 +01:00
|
|
|
systemd.services.nginx.serviceConfig.SupplementaryGroups = lib.singleton "keys";
|
2021-01-26 18:42:42 +01:00
|
|
|
|
2022-07-01 08:51:54 +02:00
|
|
|
services.syncthing.enable = true;
|
|
|
|
|
2023-02-22 16:59:01 +01:00
|
|
|
services.udisks2.enable = true; # does not have gui, but often deals with removable storage
|
|
|
|
|
2021-01-26 18:42:42 +01:00
|
|
|
networking.hostName = "fuuko";
|
|
|
|
|
|
|
|
system.stateVersion = "20.09";
|
2024-09-19 21:51:56 +02:00
|
|
|
|
|
|
|
services.postgresql = {
|
|
|
|
enable = true;
|
|
|
|
package = pkgs.postgresql_16;
|
|
|
|
};
|
|
|
|
|
|
|
|
services.postgresqlBackup = {
|
|
|
|
enable = true;
|
|
|
|
startAt = [ ]; # triggered by restic system backup
|
|
|
|
location = "/var/lib/postgresql-backup";
|
|
|
|
compression = "none";
|
|
|
|
};
|
|
|
|
systemd.services.restic-backups-system = {
|
|
|
|
after = [ "postgresqlBackup.service" ];
|
|
|
|
wants = [ "postgresqlBackup.service" ];
|
|
|
|
};
|
2021-01-26 18:42:42 +01:00
|
|
|
}
|