syncthing: merge qsyncthingtray into the module
This commit is contained in:
parent
071f7aea82
commit
2ba10cf17d
|
@ -539,6 +539,16 @@ in
|
||||||
A new module is available: 'services.qsyncthingtray'
|
A new module is available: 'services.qsyncthingtray'
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
time = "2018-01-25T11:35:08+00:00";
|
||||||
|
message = ''
|
||||||
|
'services.qsyncthingtray' has been merged into 'services.syncthing'.
|
||||||
|
Please, use 'services.syncthing.tray' option to activate the tray service.
|
||||||
|
|
||||||
|
The old module will be removed on February 25, 2018.
|
||||||
|
'';
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,7 +53,6 @@ let
|
||||||
./services/owncloud-client.nix
|
./services/owncloud-client.nix
|
||||||
./services/parcellite.nix
|
./services/parcellite.nix
|
||||||
./services/polybar.nix
|
./services/polybar.nix
|
||||||
./services/qsyncthingtray.nix
|
|
||||||
./services/random-background.nix
|
./services/random-background.nix
|
||||||
./services/redshift.nix
|
./services/redshift.nix
|
||||||
./services/screen-locker.nix
|
./services/screen-locker.nix
|
||||||
|
|
|
@ -1,29 +0,0 @@
|
||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
{
|
|
||||||
options = {
|
|
||||||
services.qsyncthingtray = {
|
|
||||||
enable = mkEnableOption "QSyncthingTray";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = mkIf config.services.qsyncthingtray.enable {
|
|
||||||
systemd.user.services.qsyncthingtray = {
|
|
||||||
Unit = {
|
|
||||||
Description = "QSyncthingTray";
|
|
||||||
After = [ "graphical-session-pre.target" ];
|
|
||||||
PartOf = [ "graphical-session.target" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
Install = {
|
|
||||||
WantedBy = [ "graphical-session.target" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
Service = {
|
|
||||||
ExecStart = "${pkgs.qsyncthingtray}/bin/QSyncthingTray";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -3,16 +3,30 @@
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
{
|
{
|
||||||
|
imports = [
|
||||||
|
(mkRenamedOptionModule
|
||||||
|
[ "services" "qsyncthingtray" "enable" ]
|
||||||
|
[ "services" "syncthing" "tray" ])
|
||||||
|
];
|
||||||
|
|
||||||
meta.maintainers = [ maintainers.rycee ];
|
meta.maintainers = [ maintainers.rycee ];
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
services.syncthing = {
|
services.syncthing = {
|
||||||
enable = mkEnableOption "Syncthing continuous file synchronization";
|
enable = mkEnableOption "Syncthing continuous file synchronization";
|
||||||
|
|
||||||
|
tray = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "Whether to enable QSyncthingTray service.";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf config.services.syncthing.enable {
|
config = mkIf config.services.syncthing.enable (mkMerge [
|
||||||
systemd.user.services.syncthing = {
|
{
|
||||||
|
systemd.user.services = {
|
||||||
|
syncthing = {
|
||||||
Unit = {
|
Unit = {
|
||||||
Description = "Syncthing - Open Source Continuous File Synchronization";
|
Description = "Syncthing - Open Source Continuous File Synchronization";
|
||||||
Documentation = "man:syncthing(1)";
|
Documentation = "man:syncthing(1)";
|
||||||
|
@ -32,3 +46,24 @@ with lib;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
(mkIf config.services.syncthing.tray {
|
||||||
|
systemd.user.services = {
|
||||||
|
qsyncthingtray = {
|
||||||
|
Unit = {
|
||||||
|
Description = "QSyncthingTray";
|
||||||
|
After = [ "graphical-session-pre.target" ];
|
||||||
|
PartOf = [ "graphical-session.target" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
Service = {
|
||||||
|
ExecStart = "${pkgs.qsyncthingtray}/bin/QSyncthingTray";
|
||||||
|
};
|
||||||
|
|
||||||
|
Install = {
|
||||||
|
WantedBy = [ "graphical-session.target" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
})
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue