syncthing
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
{
|
||||
imports = [
|
||||
./syncthing.nix
|
||||
./console/yazi.nix
|
||||
./editor/default.nix
|
||||
./shell/default.nix
|
||||
|
44
modules/home/programs/syncthing.nix
Normal file
44
modules/home/programs/syncthing.nix
Normal 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"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user