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