This commit is contained in:
mups 2024-07-19 20:46:38 +00:00
parent 3646ade4b4
commit 7f0d973b75
4 changed files with 30 additions and 1 deletions

View file

@ -26,6 +26,10 @@ in {
mods.server.astral.enable = true;
mods.server.astral.memory = "3G";
mods.server.sync.enable = true;
mods.server.sync.address = "100.85.27.29";
mods.server.sync.port = "8385";
# Use the GRUB 2 boot loader.
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/vda";

View file

@ -15,7 +15,6 @@
chromium
];
services.syncthing.enable = true;
home.sessionVariables.BROWSER = "librewolf";
programs.zsh.sessionVariables.BROWSER = "librewolf";

View file

@ -4,5 +4,6 @@
./gaming
./media.nix
./sync.nix
];
}

View file

@ -0,0 +1,25 @@
{ pkgs, lib, config, ... }: let
cfg = config.mods.server.sync;
in {
options.mods.server.sync = {
enable = lib.mkEnableOption {
default = false;
description = "enables synchronisation related servers";
};
address = lib.mkOption {
default = "127.0.0.1";
};
port = lib.mkOption {
default = "8384";
};
};
config = lib.mkIf cfg.enable {
services.syncthing.enable = true;
networking.firewall.allowedTCPPorts = [ 8384 22000 ];
networking.firewall.allowedUDPPorts = [ 22000 21027 ];
services.syncthing.guiAddress =
"${cfg.address}:${cfg.port}";
};
}