mirror of
https://github.com/nix-community/home-manager
synced 2024-11-30 06:59:45 +01:00
copyq: add module
This commit is contained in:
parent
e60080ddfb
commit
486ba3de4e
4 changed files with 65 additions and 0 deletions
2
.github/CODEOWNERS
vendored
2
.github/CODEOWNERS
vendored
|
@ -390,6 +390,8 @@ Makefile @thiagokokada
|
||||||
|
|
||||||
/modules/services/clipmenu.nix @DamienCassou
|
/modules/services/clipmenu.nix @DamienCassou
|
||||||
|
|
||||||
|
/modules/services/copyq.nix @DamienCassou
|
||||||
|
|
||||||
/modules/services/devilspie2.nix @dawidsowa
|
/modules/services/devilspie2.nix @dawidsowa
|
||||||
/tests/modules/services/devilspie2 @dawidsowa
|
/tests/modules/services/devilspie2 @dawidsowa
|
||||||
|
|
||||||
|
|
|
@ -956,6 +956,14 @@ in
|
||||||
A new module is available: 'services.listenbrainz-mpd'.
|
A new module is available: 'services.listenbrainz-mpd'.
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
time = "2023-03-22T07:31:38+00:00";
|
||||||
|
condition = hostPlatform.isLinux;
|
||||||
|
message = ''
|
||||||
|
A new module is available: 'services.copyq'.
|
||||||
|
'';
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -215,6 +215,7 @@ let
|
||||||
./services/cbatticon.nix
|
./services/cbatticon.nix
|
||||||
./services/clipman.nix
|
./services/clipman.nix
|
||||||
./services/clipmenu.nix
|
./services/clipmenu.nix
|
||||||
|
./services/copyq.nix
|
||||||
./services/devilspie2.nix
|
./services/devilspie2.nix
|
||||||
./services/dropbox.nix
|
./services/dropbox.nix
|
||||||
./services/dunst.nix
|
./services/dunst.nix
|
||||||
|
|
54
modules/services/copyq.nix
Normal file
54
modules/services/copyq.nix
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
{ 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 Waybar service.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
When setting this value to <literal>"sway-session.target"</literal>,
|
||||||
|
make sure to also enable <option>wayland.windowManager.sway.systemdIntegration</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";
|
||||||
|
};
|
||||||
|
|
||||||
|
Install = { WantedBy = [ cfg.systemdTarget ]; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue