mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 09:07:21 +01:00
feat: manage syncthing through NixOS instead
used to be done with home-manager
This commit is contained in:
parent
b7d01eb50f
commit
07b0bf77db
5 changed files with 172 additions and 18 deletions
|
|
@ -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
|
||||
|
||||
|
|
@ -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
|
||||
|
|
@ -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.
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue