1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-12-02 23:21:02 +01:00

treewide: remove with lib (#6871)

Remove from services.
This commit is contained in:
Austin Horstman 2025-04-21 09:00:59 -07:00 committed by GitHub
parent 6695b1d477
commit 82ee14ff60
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
124 changed files with 1848 additions and 1891 deletions

View file

@ -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";