1
0
mirror of https://github.com/nix-community/home-manager synced 2024-07-01 02:48:30 +02:00
home-manager/modules/services/copyq.nix
Rafael e8b5f8f9b3
Update documentation to mention renamed option name. (#4126)
PR #3747 renamed the option wayland.windowManager.sway.systemdIntegration
to wayland.windowManager.sway.systemd.enable.

This commit simply updates documentation to reference the new format.
2023-06-20 12:43:16 +02:00

56 lines
1.4 KiB
Nix

{ config, lib, pkgs, ... }:
let
cfg = config.services.copyq;
in {
meta.maintainers = [ lib.maintainers.DamienCassou ];
options.services.copyq = {
enable =
lib.mkEnableOption "CopyQ, a clipboard manager with advanced features";
package = lib.mkPackageOption pkgs "copyq" { };
systemdTarget = lib.mkOption {
type = lib.types.str;
default = "graphical-session.target";
example = "sway-session.target";
description = ''
The systemd target that will automatically start the CopyQ service.
</para>
<para>
When setting this value to <literal>"sway-session.target"</literal>,
make sure to also enable <option>wayland.windowManager.sway.systemd.enable</option>,
otherwise the service may never be started.
'';
};
};
config = lib.mkIf cfg.enable {
assertions = [
(lib.hm.assertions.assertPlatform "services.copyq" pkgs
lib.platforms.linux)
];
home.packages = [ cfg.package ];
systemd.user.services.copyq = {
Unit = {
Description = "CopyQ clipboard management daemon";
PartOf = [ "graphical-session.target" ];
After = [ "graphical-session.target" ];
};
Service = {
ExecStart = "${cfg.package}/bin/copyq";
Restart = "on-failure";
Environment = [ "QT_QPA_PLATFORM=xcb" ];
};
Install = { WantedBy = [ cfg.systemdTarget ]; };
};
};
}