mirror of
https://codeberg.org/muon/home.git
synced 2025-12-06 08:07:45 +00:00
Add sync
This commit is contained in:
parent
3646ade4b4
commit
7f0d973b75
4 changed files with 30 additions and 1 deletions
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@
|
|||
chromium
|
||||
];
|
||||
|
||||
services.syncthing.enable = true;
|
||||
|
||||
home.sessionVariables.BROWSER = "librewolf";
|
||||
programs.zsh.sessionVariables.BROWSER = "librewolf";
|
||||
|
|
|
|||
|
|
@ -4,5 +4,6 @@
|
|||
./gaming
|
||||
|
||||
./media.nix
|
||||
./sync.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
25
modules/nixos/server/sync.nix
Normal file
25
modules/nixos/server/sync.nix
Normal 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}";
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue