mirror of
https://github.com/nix-community/home-manager.git
synced 2025-12-02 23:21:02 +01:00
parent
6695b1d477
commit
82ee14ff60
124 changed files with 1848 additions and 1891 deletions
|
|
@ -5,22 +5,25 @@
|
|||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
inherit (lib)
|
||||
mkOption
|
||||
types
|
||||
;
|
||||
|
||||
cfg = config.services.unclutter;
|
||||
|
||||
in
|
||||
{
|
||||
options.services.unclutter = {
|
||||
|
||||
enable = mkEnableOption "unclutter";
|
||||
enable = lib.mkEnableOption "unclutter";
|
||||
|
||||
package = mkOption {
|
||||
description = "unclutter derivation to use.";
|
||||
type = types.package;
|
||||
default = pkgs.unclutter-xfixes;
|
||||
defaultText = literalExpression "pkgs.unclutter-xfixes";
|
||||
defaultText = lib.literalExpression "pkgs.unclutter-xfixes";
|
||||
};
|
||||
|
||||
timeout = mkOption {
|
||||
|
|
@ -46,7 +49,7 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
config = lib.mkIf cfg.enable {
|
||||
assertions = [
|
||||
(lib.hm.assertions.assertPlatform "services.unclutter" pkgs lib.platforms.linux)
|
||||
];
|
||||
|
|
@ -63,7 +66,7 @@ in
|
|||
${cfg.package}/bin/unclutter \
|
||||
--timeout ${toString cfg.timeout} \
|
||||
--jitter ${toString (cfg.threshold - 1)} \
|
||||
${concatMapStrings (x: " --${x}") cfg.extraOptions}
|
||||
${lib.concatMapStrings (x: " --${x}") cfg.extraOptions}
|
||||
'';
|
||||
RestartSec = 3;
|
||||
Restart = "always";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue