From 96028bb33c138e1b2ed6c89fe9a10db219d8e351 Mon Sep 17 00:00:00 2001 From: "Reid \"reidlab" Date: Mon, 8 Jul 2024 20:36:24 -0700 Subject: [PATCH] syncthing --- hosts/goopnet-interface/default.nix | 1 + modules/software/system/syncthing.nix | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 modules/software/system/syncthing.nix diff --git a/hosts/goopnet-interface/default.nix b/hosts/goopnet-interface/default.nix index fabf562..0a51c99 100755 --- a/hosts/goopnet-interface/default.nix +++ b/hosts/goopnet-interface/default.nix @@ -66,6 +66,7 @@ system.eza.enable = true; system.wezterm.enable = true; system.fish.enable = true; + system.syncthing.enable = true; # editors editors.micro.enable = true; editors.vscode.enable = true; diff --git a/modules/software/system/syncthing.nix b/modules/software/system/syncthing.nix new file mode 100644 index 0000000..3a05ab6 --- /dev/null +++ b/modules/software/system/syncthing.nix @@ -0,0 +1,25 @@ +{ config, lib, pkgs, ... }: + +with lib; +let + cfg = config.modules.software.system.syncthing; +in { + options.modules.software.system.syncthing = { + enable = mkEnableOption "Enable Syncthing, a file synchronization server"; + }; + + config = mkIf cfg.enable { + # declare sync folders & devices here + # edit: turns out you can't with hm?? + hm.services.syncthing = { + enable = true; + # shit broken as hell ngl + tray = { + enable = true; + package = pkgs.syncthingtray-minimal; + + command = "syncthingtray --wait"; + }; + }; + }; +} \ No newline at end of file