services: added synthing option
This commit is contained in:
parent
7f12cb9bdc
commit
69fa74b1d5
|
@ -1,6 +1,6 @@
|
|||
{ lib, ... }:
|
||||
let
|
||||
inherit (lib) mkEnableOption;
|
||||
inherit (lib) mkEnableOption mkOption types;
|
||||
in
|
||||
{
|
||||
options.profile.services = {
|
||||
|
@ -10,5 +10,6 @@ in
|
|||
kavita.enable = mkEnableOption "kavita";
|
||||
samba.enable = mkEnableOption "samba";
|
||||
nextcloud.enable = mkEnableOption "nextcloud";
|
||||
syncthing.enable = mkEnableOption "syncthing";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
kavita.enable = true;
|
||||
samba.enable = true;
|
||||
nextcloud.enable = true;
|
||||
syncthing.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -6,5 +6,6 @@
|
|||
./forgejo.nix
|
||||
./samba.nix
|
||||
./nextcloud.nix
|
||||
./syncthing.nix
|
||||
];
|
||||
}
|
||||
|
|
22
system/services/syncthing.nix
Normal file
22
system/services/syncthing.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.profile.services.syncthing;
|
||||
inherit (lib) mkIf;
|
||||
in
|
||||
{
|
||||
config = mkIf cfg.enable {
|
||||
services.caddy.virtualHosts."syncthing.tigor.web.id".extraConfig = ''
|
||||
reverse_proxy 0.0.0.0:8384
|
||||
'';
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
settings = {
|
||||
options.urAccepted = 1; # Allow anonymous usage reporting.
|
||||
};
|
||||
overrideFolders = false;
|
||||
overrideDevices = false;
|
||||
openDefaultPorts = true;
|
||||
guiAddress = "0.0.0.0:8384";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue