Skip to content

Commit

Permalink
feat: manage syncthing through NixOS instead
Browse files Browse the repository at this point in the history
used to be done with home-manager
  • Loading branch information
Swarsel committed Jul 20, 2024
1 parent b7d01eb commit cf20691
Showing 1 changed file with 51 additions and 2 deletions.
53 changes: 51 additions & 2 deletions SwarselSystems.org
Original file line number Diff line number Diff line change
Expand Up @@ -4912,7 +4912,8 @@ Some programs profit from being installed through dedicated NixOS settings on sy
};
#+end_src

Also, we setup zsh. Do not touch this.
**** zsh
Do not touch this.

#+begin_src nix :tangle profiles/common/nixos.nix

Expand All @@ -4921,6 +4922,54 @@ Also, we setup zsh. Do not touch this.
environment.shells = with pkgs; [ zsh ];
environment.pathsToLink = [ "/share/zsh" ];

#+end_src
**** syncthing

#+begin_src nix :tangle profiles/common/nixos.nix

services.syncthing = {
enable = true;
user = "swarsel";
dataDir = "/home/swarsel";
configDir = "/home/swarsel/.config/syncthing";
openDefaultPorts = true;
settings = {
devices = {
"magicant" = {
id = "SEH2NMT-IVRQUU5-VPW2HUQ-3GQYDBF-F6H6OY6-X3DZTUZ-LCRE2DJ-QNIXIQ2";
};
"sync (@oracle)" = {
id = "ETW6TST-NPK7MKZ-M4LXMHA-QUPQHDT-VTSHH5X-CR5EIN2-YU7E55F-MGT7DQB";
};
"server1" = {
id = "ZXWVC4X-IIARITZ-MERZPHN-HD55Y6G-QJM2GTB-6BWYXMR-DTO3TS2-QDBREQQ";
};
};
folders = {
"Default Folder" = {
path = "/home/swarsel/Sync";
devices = [ "sync (@oracle)" "magicant" ];
id = "default";
};
"Obsidian" = {
path = "/home/swarsel/Nextcloud/Obsidian";
devices = [ "sync (@oracle)" "magicant" ];
id = "yjvni-9eaa7";
};
"Org" = {
path = "/home/swarsel/Nextcloud/Org";
devices = [ "sync (@oracle)" "magicant" ];
id = "a7xnl-zjj3d";
};
"Vpn" = {
path = "/home/swarsel/Vpn";
devices = [ "sync (@oracle)" "magicant" ];
id = "hgp9s-fyq3p";
};
};
};
};

#+end_src

*** Services
Expand Down Expand Up @@ -6688,7 +6737,7 @@ Enables the syncthing service which talks to my syncthing instance on the Oracle
#+begin_src nix :tangle profiles/common/home.nix

services.syncthing = {
enable = true;
enable = false;
tray = {
enable = false; # we enable this by installing the syncthingtray package instead, it works better.
};
Expand Down

0 comments on commit cf20691

Please sign in to comment.