compton: add module

This commit is contained in:
Nikita Uvarov 2017-09-13 13:31:10 +02:00
parent f47084968d
commit aa69598b57
No known key found for this signature in database
GPG key ID: F7A5FB3A7C10EF96
3 changed files with 37 additions and 0 deletions

View file

@ -35,6 +35,7 @@ let
./programs/vim.nix
./programs/zsh.nix
./services/blueman-applet.nix
./services/compton.nix
./services/dunst.nix
./services/gnome-keyring.nix
./services/gpg-agent.nix

View file

@ -178,6 +178,13 @@ in
A new service is available: 'services.blueman-applet'.
'';
}
{
time = "2017-09-13T11:30:22+00:00";
message = ''
A new service is available: 'services.compton'.
'';
}
];
};
}

View file

@ -0,0 +1,29 @@
{ config, lib, pkgs, ... }:
with lib;
{
options = {
services.compton = {
enable = mkEnableOption "Compton X11 compositor";
};
};
config = mkIf config.services.compton.enable {
systemd.user.services.compton = {
Unit = {
Description = "Compton X11 compositor";
After = [ "graphical-session-pre.target" ];
PartOf = [ "graphical-session.target" ];
};
Install = {
WantedBy = [ "graphical-session.target" ];
};
Service = {
ExecStart = "${pkgs.compton}/bin/compton";
};
};
};
}