mirror of
https://github.com/starr-dusT/dotfiles.git
synced 2025-02-19 19:27:31 -08:00
16 lines
395 B
Nix
16 lines
395 B
Nix
{ config, lib, pkgs, user, ... }:
|
|
|
|
let cfg = config.modules.services.syncthing;
|
|
in {
|
|
options.modules.services.syncthing.enable = lib.mkEnableOption "syncthing";
|
|
config = lib.mkIf cfg.enable {
|
|
|
|
environment.systemPackages = with pkgs; [ syncthing ];
|
|
services.syncthing = {
|
|
enable = true;
|
|
user = "${user}";
|
|
configDir = "/home/${user}/.config/syncthing";
|
|
};
|
|
};
|
|
}
|