mirror of
https://github.com/nix-community/home-manager
synced 2024-11-24 03:59:46 +01:00
68f0ed58c1
(cherry picked from commit dd5061d73b
)
28 lines
525 B
Nix
28 lines
525 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
{
|
|
options = {
|
|
services.syncthing = {
|
|
enable = mkEnableOption "Syncthing";
|
|
};
|
|
};
|
|
|
|
config = mkIf config.services.syncthing.enable {
|
|
systemd.user.services.syncthing = {
|
|
Unit = {
|
|
Description = "Syncthing";
|
|
After = [ "network.target" ];
|
|
};
|
|
|
|
Install = {
|
|
WantedBy = [ "default.target" ];
|
|
};
|
|
|
|
Service = {
|
|
ExecStart = "${pkgs.syncthing}/bin/syncthing -no-browser";
|
|
};
|
|
};
|
|
};
|
|
}
|