mirror of
https://github.com/nix-community/home-manager
synced 2024-11-30 06:59:45 +01:00
flameshot: add module
This commit is contained in:
parent
f26cc3b957
commit
e055e4a092
3 changed files with 48 additions and 0 deletions
|
@ -641,6 +641,12 @@ in
|
|||
A new module is available: 'services.mbsync'.
|
||||
'';
|
||||
}
|
||||
{
|
||||
time = "2018-05-03T12:34:47+00:00";
|
||||
message = ''
|
||||
A new module is available: 'services.flameshot'.
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -51,6 +51,7 @@ let
|
|||
./services/blueman-applet.nix
|
||||
./services/compton.nix
|
||||
./services/dunst.nix
|
||||
./services/flameshot.nix
|
||||
./services/gnome-keyring.nix
|
||||
./services/gpg-agent.nix
|
||||
./services/kbfs.nix
|
||||
|
|
41
modules/services/flameshot.nix
Normal file
41
modules/services/flameshot.nix
Normal file
|
@ -0,0 +1,41 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
cfg = config.services.flameshot;
|
||||
package = pkgs.flameshot;
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
meta.maintainers = [ maintainers.hamhut1066 ];
|
||||
|
||||
options = {
|
||||
services.flameshot = {
|
||||
enable = mkEnableOption "Flameshot";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = [ package ];
|
||||
|
||||
systemd.user.services.flameshot = {
|
||||
Unit = {
|
||||
Description = "Powerful yet simple to use screenshot software";
|
||||
After = [ "graphical-session-pre.target" ];
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
};
|
||||
|
||||
Install = {
|
||||
WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
|
||||
Service = {
|
||||
ExecStart = "${package}/bin/flameshot";
|
||||
Restart = "on-abort";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue