mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2026-04-17 06:39:07 +02:00
wip: migrate client modules
This commit is contained in:
parent
f6d2ff1544
commit
7ce27d5d2f
245 changed files with 20254 additions and 188 deletions
51
modules-clone/nixos/client/syncthing.nix
Normal file
51
modules-clone/nixos/client/syncthing.nix
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
{ lib, config, pkgs, ... }:
|
||||
let
|
||||
inherit (config.swarselsystems) mainUser homeDir;
|
||||
devices = config.swarselsystems.syncthing.syncDevices;
|
||||
servicePort = 8384;
|
||||
in
|
||||
{
|
||||
options.swarselmodules.syncthing = lib.mkEnableOption "syncthing config";
|
||||
config = lib.mkIf config.swarselmodules.syncthing {
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
systemService = true;
|
||||
guiAddress = "127.0.0.1:${builtins.toString servicePort}";
|
||||
package = pkgs.syncthing;
|
||||
user = mainUser;
|
||||
dataDir = homeDir;
|
||||
configDir = "${homeDir}/.config/syncthing";
|
||||
openDefaultPorts = true;
|
||||
overrideDevices = true;
|
||||
overrideFolders = true;
|
||||
settings = {
|
||||
options = {
|
||||
urAccepted = -1;
|
||||
};
|
||||
inherit (config.swarselsystems.syncthing) devices;
|
||||
folders = {
|
||||
"Default Folder" = lib.mkDefault {
|
||||
path = "${homeDir}/Sync";
|
||||
inherit devices;
|
||||
id = "default";
|
||||
};
|
||||
"Obsidian" = {
|
||||
path = "${homeDir}/Obsidian";
|
||||
inherit devices;
|
||||
id = "yjvni-9eaa7";
|
||||
};
|
||||
"Org" = {
|
||||
path = "${homeDir}/Org";
|
||||
inherit devices;
|
||||
id = "a7xnl-zjj3d";
|
||||
};
|
||||
"Vpn" = {
|
||||
path = "${homeDir}/Vpn";
|
||||
inherit devices;
|
||||
id = "hgp9s-fyq3p";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue