Add syncthing service
This commit is contained in:
parent
7a18a0fb34
commit
dd5061d73b
|
@ -32,6 +32,7 @@ let
|
|||
./services/network-manager-applet.nix
|
||||
./services/random-background.nix
|
||||
./services/redshift.nix
|
||||
./services/syncthing.nix
|
||||
./services/taffybar.nix
|
||||
./services/tahoe-lafs.nix
|
||||
./services/udiskie.nix
|
||||
|
|
28
modules/services/syncthing.nix
Normal file
28
modules/services/syncthing.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{ 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue