2024-08-23 10:20:05 +02:00
|
|
|
|
# Edit this configuration file to define what should be installed on
|
|
|
|
|
|
# your system. Help is available in the configuration.nix(5) man page
|
|
|
|
|
|
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
|
|
|
|
|
{
|
2025-03-26 22:36:11 +01:00
|
|
|
|
config,
|
|
|
|
|
|
pkgs,
|
2025-03-30 21:38:13 +02:00
|
|
|
|
lib,
|
2025-03-26 22:36:11 +01:00
|
|
|
|
mms,
|
|
|
|
|
|
...
|
|
|
|
|
|
}: {
|
2024-08-23 10:20:05 +02:00
|
|
|
|
imports = [
|
|
|
|
|
|
./hardware-configuration-void.nix
|
|
|
|
|
|
./common.nix
|
2025-03-15 22:23:34 +01:00
|
|
|
|
mms.module
|
2024-08-23 10:20:05 +02:00
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
networking.hostName = "void"; # Define your hostname.
|
2024-08-26 14:23:58 +02:00
|
|
|
|
|
|
|
|
|
|
services.samba = {
|
2025-05-03 14:50:34 +02:00
|
|
|
|
enable = false;
|
2024-08-26 14:23:58 +02:00
|
|
|
|
openFirewall = true;
|
|
|
|
|
|
securityType = "user";
|
2024-12-11 17:23:34 +01:00
|
|
|
|
settings.global = {
|
|
|
|
|
|
workgroup = "WORKGROUP";
|
|
|
|
|
|
"server string" = "void";
|
|
|
|
|
|
"netbios name" = "void";
|
|
|
|
|
|
security = "user";
|
|
|
|
|
|
"hosts allow" = "0.0.0.0/0";
|
|
|
|
|
|
"guest account" = "nobody";
|
|
|
|
|
|
"map to guest" = "bad user";
|
|
|
|
|
|
"log level" = 4;
|
|
|
|
|
|
#"smb encrypt" = "mandatory";
|
|
|
|
|
|
};
|
2024-08-26 14:23:58 +02:00
|
|
|
|
shares."Music" = {
|
|
|
|
|
|
path = "/pile/Music";
|
|
|
|
|
|
browsable = "yes";
|
|
|
|
|
|
"read only" = "yes";
|
|
|
|
|
|
"guest ok" = "no";
|
|
|
|
|
|
"read list" = "@music";
|
|
|
|
|
|
};
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
users.users.music = {
|
|
|
|
|
|
group = "music";
|
|
|
|
|
|
isNormalUser = true;
|
|
|
|
|
|
};
|
2024-10-29 21:01:13 +01:00
|
|
|
|
|
|
|
|
|
|
# enqble i2c-dev kernel module for control of backlight in external monitor
|
|
|
|
|
|
# https://discourse.nixos.org/t/how-to-enable-ddc-brightness-control-i2c-permissions/20800/3
|
|
|
|
|
|
boot.extraModulePackages = [
|
|
|
|
|
|
config.boot.kernelPackages.ddcci-driver
|
|
|
|
|
|
];
|
|
|
|
|
|
boot.kernelModules = ["i2c-dev" "ddcci_backlight"];
|
|
|
|
|
|
hardware.i2c.enable = true;
|
2024-10-29 13:47:04 +01:00
|
|
|
|
|
|
|
|
|
|
# package for controlling brightness on external monitor
|
|
|
|
|
|
environment.systemPackages = [
|
|
|
|
|
|
pkgs.ddcutil
|
|
|
|
|
|
];
|
2024-11-09 16:52:19 +01:00
|
|
|
|
|
|
|
|
|
|
# mount external drive
|
|
|
|
|
|
fileSystems."/external".label = "external";
|
2025-03-28 21:27:42 +01:00
|
|
|
|
fileSystems."/external".options = ["nofail" "x-systemd.automount"];
|
2024-11-17 16:42:31 +01:00
|
|
|
|
|
2024-11-09 18:16:00 +01:00
|
|
|
|
# backup
|
|
|
|
|
|
services.borgbackup.jobs."external" = {
|
|
|
|
|
|
paths = [
|
|
|
|
|
|
"/home"
|
|
|
|
|
|
"/var"
|
|
|
|
|
|
"/pile"
|
|
|
|
|
|
];
|
|
|
|
|
|
exclude = [
|
|
|
|
|
|
"/home/*/.local/share/Steam"
|
|
|
|
|
|
"**/*cache"
|
|
|
|
|
|
"**/*Cache"
|
|
|
|
|
|
"**/*trash"
|
|
|
|
|
|
"**/*Trash"
|
|
|
|
|
|
"/home/*/.mozilla/firefox"
|
|
|
|
|
|
"/home/*/GOG Games"
|
|
|
|
|
|
"**/target"
|
|
|
|
|
|
"**/result"
|
2025-03-28 21:27:42 +01:00
|
|
|
|
"/var/log"
|
2024-11-09 18:16:00 +01:00
|
|
|
|
];
|
|
|
|
|
|
repo = "/external/voidbackup";
|
|
|
|
|
|
encryption = {
|
|
|
|
|
|
mode = "repokey-blake2";
|
|
|
|
|
|
passCommand = "cat /root/borgbackup/passphrase";
|
|
|
|
|
|
};
|
|
|
|
|
|
compression = "auto,lzma";
|
|
|
|
|
|
startAt = "daily";
|
|
|
|
|
|
persistentTimer = true;
|
2025-03-29 00:07:50 +01:00
|
|
|
|
extraCreateArgs = ["--stats" "--info" "--list" "--filter" "AMEC"];
|
2025-03-30 15:22:35 +02:00
|
|
|
|
extraPruneArgs = ["--stats" "--info" "--list"];
|
2025-03-28 21:27:42 +01:00
|
|
|
|
removableDevice = true;
|
2025-03-30 15:22:35 +02:00
|
|
|
|
prune.keep = {
|
|
|
|
|
|
within = "1d";
|
|
|
|
|
|
daily = 7;
|
|
|
|
|
|
weekly = 4;
|
|
|
|
|
|
monthly = 12;
|
|
|
|
|
|
};
|
2024-11-09 18:16:00 +01:00
|
|
|
|
};
|
|
|
|
|
|
systemd.services."borgbackup-job-external" = {
|
|
|
|
|
|
unitConfig = {
|
|
|
|
|
|
RequiresMountsFor = "/external";
|
|
|
|
|
|
Requires = "external.mount";
|
|
|
|
|
|
};
|
|
|
|
|
|
};
|
2025-08-01 11:32:39 +02:00
|
|
|
|
services.borgbackup.jobs."hetzner" = {
|
|
|
|
|
|
paths = [
|
|
|
|
|
|
"/home"
|
|
|
|
|
|
"/var"
|
|
|
|
|
|
"/pile"
|
|
|
|
|
|
];
|
|
|
|
|
|
exclude = [
|
|
|
|
|
|
"/home/*/.local/share/Steam"
|
|
|
|
|
|
"**/*cache"
|
|
|
|
|
|
"**/*Cache"
|
|
|
|
|
|
"**/*trash"
|
|
|
|
|
|
"**/*Trash"
|
|
|
|
|
|
"/home/*/.mozilla/firefox"
|
|
|
|
|
|
"/home/*/GOG Games"
|
|
|
|
|
|
"**/target"
|
|
|
|
|
|
"**/result"
|
|
|
|
|
|
"/var/log"
|
2025-08-03 14:25:03 +02:00
|
|
|
|
"/pile/void2backup"
|
2025-08-01 11:32:39 +02:00
|
|
|
|
];
|
|
|
|
|
|
repo = "ssh://u480566-sub1@u480566-sub1.your-storagebox.de:23/./repo";
|
|
|
|
|
|
encryption = {
|
|
|
|
|
|
mode = "repokey-blake2";
|
|
|
|
|
|
passCommand = "cat /root/borgbackup/hetzner_passphrase";
|
|
|
|
|
|
};
|
|
|
|
|
|
environment.BORG_RSH = "ssh -i /root/borgbackup/hetzner_ssh_key";
|
|
|
|
|
|
compression = "auto,lzma";
|
|
|
|
|
|
startAt = "daily";
|
|
|
|
|
|
persistentTimer = true;
|
|
|
|
|
|
extraCreateArgs = ["--stats" "--info" "--list" "--filter" "AMEC"];
|
|
|
|
|
|
extraPruneArgs = ["--stats" "--info" "--list"];
|
|
|
|
|
|
prune.keep = {
|
|
|
|
|
|
within = "1d";
|
|
|
|
|
|
daily = 7;
|
|
|
|
|
|
weekly = 4;
|
|
|
|
|
|
monthly = 12;
|
|
|
|
|
|
};
|
|
|
|
|
|
preHook = ''
|
|
|
|
|
|
/bin/sh -c 'while ! /run/current-system/sw/bin/ping -c1 google.com; do sleep 1; done'
|
|
|
|
|
|
'';
|
|
|
|
|
|
};
|
2025-03-15 22:23:34 +01:00
|
|
|
|
|
2025-03-28 22:41:12 +01:00
|
|
|
|
# postgresql backup
|
|
|
|
|
|
services.postgresqlBackup = {
|
|
|
|
|
|
enable = true;
|
|
|
|
|
|
backupAll = true;
|
|
|
|
|
|
location = "/var/backup/postgresql";
|
|
|
|
|
|
};
|
|
|
|
|
|
systemd.timers."postgresqlBackup".unitConfig.Persistent = true;
|
|
|
|
|
|
|
2025-03-15 22:23:34 +01:00
|
|
|
|
# minecraft TerraFirmaGreg server
|
2025-04-17 19:42:52 +02:00
|
|
|
|
services.modded-minecraft-servers = let
|
|
|
|
|
|
# "Borrowed" from AllTheMods Discord
|
|
|
|
|
|
jvmOpts = builtins.concatStringsSep " " [
|
|
|
|
|
|
"-XX:+UseG1GC"
|
|
|
|
|
|
"-XX:+ParallelRefProcEnabled"
|
|
|
|
|
|
"-XX:MaxGCPauseMillis=200"
|
|
|
|
|
|
"-XX:+UnlockExperimentalVMOptions"
|
|
|
|
|
|
"-XX:+DisableExplicitGC"
|
|
|
|
|
|
"-XX:+AlwaysPreTouch"
|
|
|
|
|
|
"-XX:G1NewSizePercent=40"
|
|
|
|
|
|
"-XX:G1MaxNewSizePercent=50"
|
|
|
|
|
|
"-XX:G1HeapRegionSize=16M"
|
|
|
|
|
|
"-XX:G1ReservePercent=15"
|
|
|
|
|
|
"-XX:G1HeapWastePercent=5"
|
|
|
|
|
|
"-XX:G1MixedGCCountTarget=4"
|
|
|
|
|
|
"-XX:InitiatingHeapOccupancyPercent=20"
|
|
|
|
|
|
"-XX:G1MixedGCLiveThresholdPercent=90"
|
|
|
|
|
|
"-XX:G1RSetUpdatingPauseTimePercent=5"
|
|
|
|
|
|
"-XX:SurvivorRatio=32"
|
|
|
|
|
|
"-XX:+PerfDisableSharedMem"
|
|
|
|
|
|
"-XX:MaxTenuringThreshold=1"
|
|
|
|
|
|
];
|
|
|
|
|
|
in {
|
2025-03-15 22:23:34 +01:00
|
|
|
|
eula = true;
|
|
|
|
|
|
instances.terrafirmagreg = {
|
|
|
|
|
|
enable = true;
|
|
|
|
|
|
rsyncSSHKeys = [""];
|
|
|
|
|
|
serverConfig = {
|
|
|
|
|
|
server-port = 25565;
|
2025-08-09 10:06:17 +02:00
|
|
|
|
motd = "Welcome to logistic-bot's TerraFirmaGreg server (v0.10.7)";
|
2025-04-17 19:42:52 +02:00
|
|
|
|
allow-flight = true;
|
|
|
|
|
|
allow-nether = false;
|
|
|
|
|
|
difficulty = 0;
|
|
|
|
|
|
enable-rcon = false;
|
|
|
|
|
|
level-type = "tfc\:overworld";
|
|
|
|
|
|
view-distance = 24;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
inherit jvmOpts;
|
|
|
|
|
|
jvmPackage = pkgs.jdk17;
|
|
|
|
|
|
jvmMaxAllocation = "8196M";
|
|
|
|
|
|
jvmInitialAllocation = "2048M";
|
|
|
|
|
|
};
|
|
|
|
|
|
instances.terrafirmagreg-stable = {
|
2025-07-11 21:03:10 +02:00
|
|
|
|
enable = false;
|
2025-04-17 19:42:52 +02:00
|
|
|
|
rsyncSSHKeys = [""];
|
|
|
|
|
|
serverConfig = {
|
|
|
|
|
|
server-port = 25566;
|
|
|
|
|
|
motd = "Welcome to logistic-bot's TerraFirmaGreg server (v0.7.19 stable)";
|
2025-03-15 22:23:34 +01:00
|
|
|
|
allow-flight = true;
|
|
|
|
|
|
allow-nether = false;
|
|
|
|
|
|
difficulty = 0;
|
|
|
|
|
|
enable-rcon = false;
|
|
|
|
|
|
level-type = "tfc\:overworld";
|
|
|
|
|
|
view-distance = 24;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
jvmPackage = pkgs.jdk17;
|
|
|
|
|
|
jvmMaxAllocation = "8196M";
|
|
|
|
|
|
jvmInitialAllocation = "2048M";
|
|
|
|
|
|
|
|
|
|
|
|
# "Borrowed" from AllTheMods Discord
|
2025-04-17 19:42:52 +02:00
|
|
|
|
inherit jvmOpts;
|
2025-03-15 22:23:34 +01:00
|
|
|
|
};
|
|
|
|
|
|
};
|
2025-07-11 22:26:30 +02:00
|
|
|
|
systemd.services."mc-terrafirmagreg" = {
|
|
|
|
|
|
requires = ["NetworkManager-wait-online.service"];
|
|
|
|
|
|
after = ["NetworkManager-wait-online.service"];
|
|
|
|
|
|
};
|
2025-03-26 22:36:11 +01:00
|
|
|
|
|
2025-03-28 23:17:53 +01:00
|
|
|
|
services.miniflux = {
|
|
|
|
|
|
enable = true;
|
|
|
|
|
|
config = {
|
|
|
|
|
|
LISTEN_ADDR = "localhost:8700";
|
|
|
|
|
|
BASE_URL = "http://miniflux.005540.xyz";
|
|
|
|
|
|
CREATE_ADMIN = 1;
|
|
|
|
|
|
};
|
|
|
|
|
|
adminCredentialsFile = "/home/khais/.miniflux.password";
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2025-03-26 22:36:11 +01:00
|
|
|
|
services.jellyfin = {
|
|
|
|
|
|
enable = true;
|
|
|
|
|
|
openFirewall = true;
|
|
|
|
|
|
user = "khais";
|
|
|
|
|
|
};
|
2025-03-27 20:14:41 +01:00
|
|
|
|
|
2025-03-29 00:53:52 +01:00
|
|
|
|
services.forgejo = {
|
2025-03-27 22:06:49 +01:00
|
|
|
|
enable = true;
|
|
|
|
|
|
database.type = "postgres";
|
|
|
|
|
|
# Enable support for Git Large File Storage
|
|
|
|
|
|
lfs.enable = true;
|
|
|
|
|
|
settings = {
|
|
|
|
|
|
server = {
|
|
|
|
|
|
DOMAIN = "forgejo.005540.xyz";
|
|
|
|
|
|
# You need to specify this to remove the port from URLs in the web UI.
|
|
|
|
|
|
ROOT_URL = "https://forgejo.005540.xyz/";
|
|
|
|
|
|
HTTP_PORT = 3000;
|
|
|
|
|
|
};
|
|
|
|
|
|
# You can temporarily allow registration to create an admin user.
|
|
|
|
|
|
service.DISABLE_REGISTRATION = false;
|
2025-04-12 16:21:27 +02:00
|
|
|
|
service.REGISTER_MANUAL_CONFIRM = true;
|
2025-03-27 22:06:49 +01:00
|
|
|
|
# Add support for actions, based on act: https://github.com/nektos/act
|
|
|
|
|
|
actions = {
|
|
|
|
|
|
ENABLED = true;
|
|
|
|
|
|
DEFAULT_ACTIONS_URL = "github";
|
|
|
|
|
|
};
|
|
|
|
|
|
};
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2025-03-30 21:38:13 +02:00
|
|
|
|
services.paperless = {
|
|
|
|
|
|
enable = true;
|
2025-07-12 10:35:06 +02:00
|
|
|
|
address = "127.0.0.1";
|
2025-03-30 21:38:13 +02:00
|
|
|
|
port = 28981;
|
|
|
|
|
|
passwordFile = "/etc/nixos/secrets/paperless-password";
|
|
|
|
|
|
consumptionDir = "/var/lib/paperless-upload";
|
|
|
|
|
|
settings = {
|
|
|
|
|
|
PAPERLESS_DBHOST = "/run/postgresql";
|
|
|
|
|
|
PAPERLESS_DBNAME = "paperless";
|
|
|
|
|
|
PAPERLESS_DBUSER = "paperless";
|
|
|
|
|
|
PAPERLESS_DBPASS = "paperless";
|
|
|
|
|
|
PAPERLESS_OCR_LANGUAGE = "fra+eng+deu";
|
|
|
|
|
|
PAPERLESS_FILENAME_FORMAT = "{created_year}/{correspondent}/{title}";
|
|
|
|
|
|
PAPERLESS_OCR_USER_ARGS = {
|
|
|
|
|
|
optimize = 1;
|
|
|
|
|
|
pdfa_image_compression = "lossless";
|
|
|
|
|
|
# do not fail to import documents that have a digital signature
|
|
|
|
|
|
# https://github.com/paperless-ngx/paperless-ngx/discussions/4047#discussioncomment-7019544
|
|
|
|
|
|
invalidate_digital_signatures = true;
|
|
|
|
|
|
};
|
|
|
|
|
|
PAPERLESS_TIME_ZONE = "Europe/Paris";
|
|
|
|
|
|
PAPERLESS_CONSUMER_ENABLE_BARCODES = "true";
|
|
|
|
|
|
PAPERLESS_CONSUMER_ENABLE_ASN_BARCODE = "true";
|
|
|
|
|
|
PAPERLESS_CONSUMER_BARCODE_SCANNER = "ZXING";
|
|
|
|
|
|
PAPERLESS_TASK_WORKERS = "4";
|
|
|
|
|
|
PAPERLESS_THREADS_PER_WORKER = "1";
|
|
|
|
|
|
PAPERLESS_WORKER_TIMEOUT = "18000";
|
2025-07-12 10:35:06 +02:00
|
|
|
|
PAPERLESS_URL = "https://paperless.005540.xyz";
|
2025-03-30 21:38:13 +02:00
|
|
|
|
};
|
|
|
|
|
|
};
|
|
|
|
|
|
users.groups.paperless-upload = {};
|
|
|
|
|
|
users.users.paperless = {
|
2025-04-17 19:42:52 +02:00
|
|
|
|
extraGroups = ["paperless-upload"];
|
2025-03-30 21:38:13 +02:00
|
|
|
|
};
|
|
|
|
|
|
users.users.paperless-upload = {
|
|
|
|
|
|
isNormalUser = true;
|
|
|
|
|
|
homeMode = "770";
|
2025-04-17 19:42:52 +02:00
|
|
|
|
extraGroups = ["paperless"];
|
2025-03-30 21:38:13 +02:00
|
|
|
|
};
|
2025-04-17 19:42:52 +02:00
|
|
|
|
system.activationScripts.makePaperlessUploadDir = lib.stringAfter ["var"] ''
|
2025-03-30 21:38:13 +02:00
|
|
|
|
mkdir -m 775 -p /var/lib/paperless-upload
|
|
|
|
|
|
chown paperless:paperless /var/lib/paperless-upload/
|
|
|
|
|
|
'';
|
|
|
|
|
|
|
2025-04-02 22:41:43 +02:00
|
|
|
|
# immich
|
|
|
|
|
|
services.immich = {
|
|
|
|
|
|
enable = true;
|
|
|
|
|
|
port = 2283;
|
|
|
|
|
|
mediaLocation = "/pile/Photos/immich";
|
|
|
|
|
|
settings.server.externalDomain = "http://immich.005540.xyz";
|
|
|
|
|
|
};
|
2025-04-17 19:42:52 +02:00
|
|
|
|
system.activationScripts.makeImmichMediaDir = lib.stringAfter ["var"] ''
|
2025-04-02 22:41:43 +02:00
|
|
|
|
mkdir -m 775 -p /pile/Photos/immich
|
|
|
|
|
|
chown immich:immich /pile/Photos/immich
|
|
|
|
|
|
'';
|
|
|
|
|
|
users.users.immich.extraGroups = ["video" "render"];
|
|
|
|
|
|
|
2025-07-13 11:10:48 +02:00
|
|
|
|
services.nextcloud = {
|
|
|
|
|
|
enable = true;
|
|
|
|
|
|
package = pkgs.nextcloud31;
|
|
|
|
|
|
hostName = "nextcloud.005540.xyz";
|
|
|
|
|
|
https = true;
|
|
|
|
|
|
secretFile = "/etc/nixos/secrets/nextcloud/secrets.json";
|
|
|
|
|
|
config.adminpassFile = "/etc/nixos/secrets/nextcloud/adminpass";
|
|
|
|
|
|
config.dbtype = "pgsql";
|
|
|
|
|
|
settings.default_locale = "fr";
|
|
|
|
|
|
settings.default_phone_region = "+33";
|
|
|
|
|
|
database.createLocally = true;
|
|
|
|
|
|
configureRedis = true;
|
|
|
|
|
|
maxUploadSize = "64G";
|
|
|
|
|
|
};
|
2025-08-08 17:06:31 +02:00
|
|
|
|
services.nextcloud-whiteboard-server = {
|
|
|
|
|
|
enable = true;
|
|
|
|
|
|
secrets = ["/etc/nixos/secrets/nextcloud/whiteboard_secrets"];
|
|
|
|
|
|
settings = {
|
|
|
|
|
|
NEXTCLOUD_URL = "https://nextcloud.005540.xyz";
|
|
|
|
|
|
};
|
|
|
|
|
|
};
|
2025-08-08 17:44:26 +02:00
|
|
|
|
services.collabora-online = {
|
|
|
|
|
|
enable = true;
|
|
|
|
|
|
settings = {
|
|
|
|
|
|
ssl = {
|
|
|
|
|
|
enable = false;
|
|
|
|
|
|
termination = true;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
net = {
|
|
|
|
|
|
listen = "loopback";
|
|
|
|
|
|
post_allow.host = ["::1"];
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
storage.wopi = {
|
|
|
|
|
|
"@allow" = true;
|
|
|
|
|
|
host = ["nextcloud.005540.xyz"];
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
server_name = "collabora.005540.xyz";
|
|
|
|
|
|
};
|
|
|
|
|
|
};
|
2025-07-13 11:10:48 +02:00
|
|
|
|
|
2025-04-06 15:46:19 +02:00
|
|
|
|
# dynamic dns
|
|
|
|
|
|
services.ddclient = {
|
|
|
|
|
|
enable = true;
|
|
|
|
|
|
protocol = "namecheap";
|
|
|
|
|
|
passwordFile = "/etc/nixos/secrets/ddclient/password";
|
|
|
|
|
|
server = "dynamicdns.park-your-domain.com";
|
|
|
|
|
|
username = "005540.xyz";
|
|
|
|
|
|
domains = ["@" "*"];
|
|
|
|
|
|
use = "web";
|
|
|
|
|
|
extraConfig = ''
|
|
|
|
|
|
web=dynamicdns.park-your-domain.com/getip
|
|
|
|
|
|
'';
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2025-07-11 21:09:56 +02:00
|
|
|
|
# static ipv6
|
|
|
|
|
|
networking.interfaces.wlo1.ipv6.addresses = [
|
|
|
|
|
|
{
|
|
|
|
|
|
address = "2a01:cb06:101:e100:e052:b96a:4ea7:5fa0";
|
|
|
|
|
|
prefixLength = 64;
|
|
|
|
|
|
}
|
|
|
|
|
|
];
|
|
|
|
|
|
|
2025-04-06 20:29:45 +02:00
|
|
|
|
security.acme = {
|
|
|
|
|
|
acceptTerms = true;
|
|
|
|
|
|
defaults = {
|
|
|
|
|
|
email = "khais.colin+letsencrypt@gmail.com";
|
|
|
|
|
|
dnsProvider = "namecheap";
|
|
|
|
|
|
};
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2025-04-13 12:21:13 +02:00
|
|
|
|
services.victorialogs = {
|
|
|
|
|
|
enable = true;
|
|
|
|
|
|
extraOptions = ["-memory.allowedBytes=100MB"];
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
services.journald.upload = {
|
|
|
|
|
|
enable = true;
|
|
|
|
|
|
settings.Upload.URL = "http://localhost:9428/insert/journald";
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2025-04-06 20:29:45 +02:00
|
|
|
|
networking.firewall.allowedTCPPorts = [
|
|
|
|
|
|
80
|
|
|
|
|
|
443
|
|
|
|
|
|
];
|
|
|
|
|
|
networking.firewall.allowedUDPPorts = [
|
|
|
|
|
|
80
|
|
|
|
|
|
443
|
|
|
|
|
|
];
|
|
|
|
|
|
|
2025-03-29 00:53:52 +01:00
|
|
|
|
# reverse proxy
|
2025-03-27 20:14:41 +01:00
|
|
|
|
services.nginx = {
|
|
|
|
|
|
enable = true;
|
|
|
|
|
|
recommendedTlsSettings = true;
|
|
|
|
|
|
recommendedOptimisation = true;
|
|
|
|
|
|
recommendedGzipSettings = true;
|
|
|
|
|
|
recommendedProxySettings = true;
|
2025-04-06 20:29:45 +02:00
|
|
|
|
logError = "stderr info";
|
2025-04-12 19:25:09 +02:00
|
|
|
|
appendHttpConfig = ''
|
|
|
|
|
|
access_log syslog:server=unix:/dev/log combined;
|
|
|
|
|
|
'';
|
2025-03-27 20:14:41 +01:00
|
|
|
|
virtualHosts = {
|
|
|
|
|
|
"void.hummingbird-stork.ts.net" = {
|
|
|
|
|
|
locations."/".proxyPass = "http://localhost:8096";
|
|
|
|
|
|
};
|
|
|
|
|
|
"jellyfin.005540.xyz" = {
|
|
|
|
|
|
locations."/".proxyPass = "http://localhost:8096";
|
2025-04-06 20:29:45 +02:00
|
|
|
|
enableACME = true;
|
2025-07-19 22:05:59 +02:00
|
|
|
|
forceSSL = true;
|
2025-03-27 20:14:41 +01:00
|
|
|
|
};
|
2025-03-27 22:06:49 +01:00
|
|
|
|
"forgejo.005540.xyz" = {
|
|
|
|
|
|
locations."/".proxyPass = "http://localhost:3000";
|
2025-04-06 20:29:45 +02:00
|
|
|
|
enableACME = true;
|
2025-07-19 22:05:59 +02:00
|
|
|
|
forceSSL = true;
|
2025-03-27 22:06:49 +01:00
|
|
|
|
};
|
2025-03-28 23:17:53 +01:00
|
|
|
|
"miniflux.005540.xyz" = {
|
|
|
|
|
|
locations."/".proxyPass = "http://localhost:8700";
|
2025-04-06 20:29:45 +02:00
|
|
|
|
enableACME = true;
|
2025-07-19 22:05:59 +02:00
|
|
|
|
forceSSL = true;
|
2025-03-28 23:17:53 +01:00
|
|
|
|
};
|
2025-04-06 16:22:04 +02:00
|
|
|
|
"paperless.005540.xyz" = {
|
2025-03-30 21:38:13 +02:00
|
|
|
|
locations."/".proxyPass = "http://localhost:28981";
|
2025-04-06 20:29:45 +02:00
|
|
|
|
enableACME = true;
|
2025-07-19 22:05:59 +02:00
|
|
|
|
forceSSL = true;
|
2025-03-30 21:38:13 +02:00
|
|
|
|
};
|
2025-04-02 22:41:43 +02:00
|
|
|
|
"immich.005540.xyz" = {
|
|
|
|
|
|
locations."/".proxyPass = "http://localhost:2283";
|
|
|
|
|
|
locations."/".proxyWebsockets = true;
|
|
|
|
|
|
extraConfig = ''
|
|
|
|
|
|
client_max_body_size 50000M;
|
|
|
|
|
|
proxy_read_timeout 600s;
|
|
|
|
|
|
proxy_send_timeout 600s;
|
|
|
|
|
|
send_timeout 600s;
|
|
|
|
|
|
'';
|
2025-04-06 20:29:45 +02:00
|
|
|
|
enableACME = true;
|
2025-07-19 22:05:59 +02:00
|
|
|
|
forceSSL = true;
|
2025-04-02 22:41:43 +02:00
|
|
|
|
};
|
2025-04-12 16:37:21 +02:00
|
|
|
|
"audiobookshelf.005540.xyz" = {
|
|
|
|
|
|
locations."/".proxyPass = "http://localhost:8000";
|
|
|
|
|
|
locations."/".proxyWebsockets = true;
|
|
|
|
|
|
enableACME = true;
|
2025-07-19 22:05:59 +02:00
|
|
|
|
forceSSL = true;
|
2025-04-12 16:37:21 +02:00
|
|
|
|
};
|
2025-04-13 12:21:13 +02:00
|
|
|
|
"victorialogs.005540.xyz" = {
|
|
|
|
|
|
locations."/".proxyPass = "http://localhost:9428";
|
|
|
|
|
|
locations."/".basicAuthFile = "/etc/nixos/secrets/victorialogs/basicauth";
|
|
|
|
|
|
enableACME = true;
|
2025-07-19 22:05:59 +02:00
|
|
|
|
forceSSL = true;
|
2025-04-13 12:21:13 +02:00
|
|
|
|
};
|
2025-07-13 11:10:48 +02:00
|
|
|
|
"nextcloud.005540.xyz" = {
|
2025-07-29 12:16:21 +02:00
|
|
|
|
locations."/".proxyWebsockets = true;
|
2025-08-08 17:06:31 +02:00
|
|
|
|
locations."/whiteboard/" = {
|
|
|
|
|
|
proxyWebsockets = true;
|
|
|
|
|
|
proxyPass = "http://localhost:3002/";
|
|
|
|
|
|
};
|
2025-07-13 11:10:48 +02:00
|
|
|
|
enableACME = true;
|
|
|
|
|
|
forceSSL = true;
|
|
|
|
|
|
};
|
2025-08-08 17:44:26 +02:00
|
|
|
|
"collabora.005540.xyz" = {
|
|
|
|
|
|
locations."/" = {
|
|
|
|
|
|
proxyPass = "http://[::1]:${toString config.services.collabora-online.port}";
|
|
|
|
|
|
proxyWebsockets = true;
|
|
|
|
|
|
};
|
|
|
|
|
|
enableACME = true;
|
|
|
|
|
|
forceSSL = true;
|
|
|
|
|
|
};
|
2025-03-27 20:14:41 +01:00
|
|
|
|
};
|
|
|
|
|
|
};
|
2024-08-23 10:20:05 +02:00
|
|
|
|
}
|