diff --git a/hosts/common/optional/syncthing.nix b/hosts/common/optional/syncthing.nix new file mode 100644 index 00000000..cbba5c64 --- /dev/null +++ b/hosts/common/optional/syncthing.nix @@ -0,0 +1,30 @@ +# https://docs.syncthing.net/users/config.html +{ + pkgs, + ... +}: + +{ + services = { + syncthing = { + enable = true; + dataDir = "/home/administrator"; + group = "syncthing"; + guiAddress = "127.0.0.1:8384"; + openDefaultPorts = true; + package = pkgs.syncthing; + settings = { + gui = { + theme = "black"; + }; + folders = { + "/home/administrator/Documents" ={ + id = "documents_sync"; + }; + }; + }; + systemService = true; + user = "syncthing"; + }; + }; +} \ No newline at end of file diff --git a/hosts/common/users/administrator/default.nix b/hosts/common/users/administrator/default.nix index f06daf90..a822d547 100644 --- a/hosts/common/users/administrator/default.nix +++ b/hosts/common/users/administrator/default.nix @@ -25,6 +25,7 @@ in "git" "libvirtd" "deluge" + "syncthing" ]; openssh.authorizedKeys.keys = [ (builtins.readFile ../../../../home/ssh.pub) ];