syncthing module
This commit is contained in:
parent
e798c797b5
commit
75a6dfa693
3 changed files with 58 additions and 1 deletions
|
@ -17,7 +17,10 @@
|
|||
# Set your time zone.
|
||||
time.timeZone = "America/Los_Angeles";
|
||||
|
||||
snowhawk.dwm.enable = true;
|
||||
snowhawk = {
|
||||
dwm.enable = true;
|
||||
syncthing.enable = true;
|
||||
};
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver = {
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
./i18n.nix
|
||||
./audio.nix
|
||||
./env.nix
|
||||
./syncthing.nix
|
||||
];
|
||||
|
||||
snowhawk.i18n.enable = lib.mkDefault true;
|
||||
|
|
53
modules/syncthing.nix
Normal file
53
modules/syncthing.nix
Normal file
|
@ -0,0 +1,53 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.snowhawk.syncthing;
|
||||
in
|
||||
{
|
||||
options.snowhawk.syncthing = {
|
||||
enable = mkEnableOption "syncthing";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
|
||||
user = "ravenshade";
|
||||
group = "users";
|
||||
|
||||
dataDir = "/home/ravenshade/syncthing";
|
||||
configDir = "/home/ravenshade/.config/syncthing";
|
||||
|
||||
overrideFolders = true;
|
||||
overrideDevices = false;
|
||||
|
||||
settings = {
|
||||
devices = {
|
||||
msiserver = { id = "KVUA7S4-UHZHKHS-3NX2WSY-MWACTER-SNZBIN4-QMCT5KS-O4NQASP-65HFOAO"; };
|
||||
macbook = { id = "O7EB4D6-AH4A53X-YM6UE7K-T3CJGIZ-MRJ6J7U-DXTEOKB-Z7LSV2M-LVUWFAO"; };
|
||||
s22 = { id = "IS2F2X5-43F7B2Q-SVSNY4J-GOHU5XP-NSJ2MJS-GDDNNTR-BGPQHHE-TE4JDAX"; };
|
||||
};
|
||||
|
||||
folders = {
|
||||
"obsidian" = rec {
|
||||
id = "obsidian";
|
||||
label = id;
|
||||
path = "/home/ravenshade/obsidian";
|
||||
devices = [ "msiserver" "macbook" "s22" ];
|
||||
};
|
||||
};
|
||||
|
||||
gui = {
|
||||
theme = "dark";
|
||||
};
|
||||
|
||||
options = {
|
||||
urAccepted = -1;
|
||||
localAnnounceEnabled = false;
|
||||
relaysEnabled = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue