feat(home): Syncthing
This commit is contained in:
parent
a2f9247f5d
commit
8da17cb0d5
3 changed files with 33 additions and 12 deletions
|
@ -54,6 +54,7 @@ in
|
|||
clipboard = enabled;
|
||||
# TODO: bundle this with the WM under xorg
|
||||
dunst = enabled;
|
||||
syncthing = enabled;
|
||||
};
|
||||
xorg = {
|
||||
xsession = enabled;
|
||||
|
|
32
modules/home/services/syncthing/default.nix
Normal file
32
modules/home/services/syncthing/default.nix
Normal file
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
namespace,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkIf;
|
||||
inherit (lib.${namespace}) mkEnableModule;
|
||||
|
||||
cfg = config.${namespace}.services.syncthing;
|
||||
in
|
||||
{
|
||||
options = mkEnableModule "services.syncthing";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = [
|
||||
config.services.syncthing.tray.package
|
||||
];
|
||||
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
|
||||
tray = {
|
||||
enable = true;
|
||||
command = "syncthingtray";
|
||||
package = pkgs.syncthingtray-minimal;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
|
||||
tray = {
|
||||
enable = true;
|
||||
command = "syncthingtray";
|
||||
package = pkgs.syncthingtray-minimal;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue