mirror of
https://github.com/nix-community/home-manager
synced 2024-11-23 11:39:46 +01:00
parcellite: add module
This adds a Parcellite service. It has no configuration options, since the app has its own mutable preferences dialog, which unconditionally replaces `~/.config/parcellite/parcelliterc` when preferences are saved.
This commit is contained in:
parent
c023b0532a
commit
aa1bf31bcb
3 changed files with 55 additions and 0 deletions
|
@ -503,6 +503,13 @@ in
|
|||
'services.kbfs' and 'services.keybase'
|
||||
'';
|
||||
}
|
||||
|
||||
{
|
||||
time = "2017-12-07T22:23:11+00:00";
|
||||
message = ''
|
||||
A new module is available: 'services.parcellite'
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -51,6 +51,7 @@ let
|
|||
./services/keybase.nix
|
||||
./services/network-manager-applet.nix
|
||||
./services/owncloud-client.nix
|
||||
./services/parcellite.nix
|
||||
./services/polybar.nix
|
||||
./services/random-background.nix
|
||||
./services/redshift.nix
|
||||
|
|
47
modules/services/parcellite.nix
Normal file
47
modules/services/parcellite.nix
Normal file
|
@ -0,0 +1,47 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
cfg = config.services.parcellite;
|
||||
package = pkgs.parcellite;
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
meta.maintainers = [ maintainers.gleber ];
|
||||
|
||||
options = {
|
||||
services.parcellite = {
|
||||
enable = mkEnableOption "Parcellite";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = [ package ];
|
||||
|
||||
systemd.user.services.parcellite = {
|
||||
Unit = {
|
||||
Description = "Lightweight GTK+ clipboard manager";
|
||||
After = [ "graphical-session-pre.target" ];
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
};
|
||||
|
||||
Install = {
|
||||
WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
|
||||
Service = {
|
||||
# PATH have been added in nixpkgs.parcellite, keeping it here for
|
||||
# backward compatibility. XDG_DATA_DIRS is necessary to make it pick up
|
||||
# icons correctly.
|
||||
Environment = ''
|
||||
PATH=${package}/bin:${pkgs.which}/bin:${pkgs.xdotool}/bin XDG_DATA_DIRS=${pkgs.hicolor_icon_theme}/share
|
||||
'';
|
||||
ExecStart = "${package}/bin/parcellite";
|
||||
Restart = "on-abort";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue