syncthing

This commit is contained in:
unexplrd
2025-03-12 15:46:52 +02:00
parent 2be4d3f258
commit 04174ccd34
5 changed files with 51 additions and 7 deletions

View File

@ -1,5 +1,6 @@
{
imports = [
./syncthing.nix
./console/yazi.nix
./editor/default.nix
./shell/default.nix

View File

@ -0,0 +1,44 @@
{
config,
lib,
...
}:
with lib; let
cfg = config.syncthing;
in {
options = {
syncthing.enable = mkEnableOption "enable syncthing";
};
config = mkIf cfg.enable {
systemd.user.services.syncthing.environment.STNODEFAULTFOLDER = "true"; # Don't create default ~/Sync folder
services.syncthing = {
enable = true;
settings = {
options = {
urAccepted = -1;
relaysEnabled = false;
};
devices = {
"dunamis" = {id = "72VRZFX-65SZUKP-2XL2WLG-75MMKLG-PQLDEZN-G5OI5U7-RLF4OHS-LNCXEQX";};
"sarien" = {id = "LUVZGFV-OV6FV5E-SDROWHZ-4BR5PFB-VP5Y326-AFEP6NL-ORUMJQQ-SSYCQQO";};
};
folders = {
"docs" = {
path = "/home/user/docs";
devices = [
"dunamis"
"sarien"
];
};
"programming" = {
path = "/home/user/programming";
devices = [
"dunamis"
"sarien"
];
};
};
};
};
};
}