mirror of
https://github.com/nix-community/home-manager.git
synced 2025-03-26 01:51:37 +00:00
home-cursor: explicit lib usage
This commit is contained in:
parent
144f13f535
commit
32531e4572
1 changed files with 10 additions and 8 deletions
|
@ -1,7 +1,9 @@
|
||||||
{ config, options, lib, pkgs, ... }:
|
{ config, options, lib, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib) mkDefault mkEnableOption mkOption types;
|
inherit (lib)
|
||||||
|
mkEnableOption mkOption mkIf mkMerge mkDefault mkAliasOptionModule types
|
||||||
|
literalExpression escapeShellArg hm getAttrFromPath any optional;
|
||||||
|
|
||||||
cfg = config.home.pointerCursor;
|
cfg = config.home.pointerCursor;
|
||||||
|
|
||||||
|
@ -9,7 +11,7 @@ let
|
||||||
options = {
|
options = {
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
example = lib.literalExpression "pkgs.vanilla-dmz";
|
example = literalExpression "pkgs.vanilla-dmz";
|
||||||
description = "Package providing the cursor theme.";
|
description = "Package providing the cursor theme.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -64,8 +66,8 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
cursorPath =
|
cursorPath =
|
||||||
"${cfg.package}/share/icons/${lib.escapeShellArg cfg.name}/cursors/${
|
"${cfg.package}/share/icons/${escapeShellArg cfg.name}/cursors/${
|
||||||
lib.escapeShellArg cfg.x11.defaultCursor
|
escapeShellArg cfg.x11.defaultCursor
|
||||||
}";
|
}";
|
||||||
|
|
||||||
defaultIndexThemePackage = pkgs.writeTextFile {
|
defaultIndexThemePackage = pkgs.writeTextFile {
|
||||||
|
@ -86,22 +88,22 @@ in {
|
||||||
meta.maintainers = [ lib.maintainers.league ];
|
meta.maintainers = [ lib.maintainers.league ];
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
(lib.mkAliasOptionModule [ "xsession" "pointerCursor" "package" ] [
|
(mkAliasOptionModule [ "xsession" "pointerCursor" "package" ] [
|
||||||
"home"
|
"home"
|
||||||
"pointerCursor"
|
"pointerCursor"
|
||||||
"package"
|
"package"
|
||||||
])
|
])
|
||||||
(lib.mkAliasOptionModule [ "xsession" "pointerCursor" "name" ] [
|
(mkAliasOptionModule [ "xsession" "pointerCursor" "name" ] [
|
||||||
"home"
|
"home"
|
||||||
"pointerCursor"
|
"pointerCursor"
|
||||||
"name"
|
"name"
|
||||||
])
|
])
|
||||||
(lib.mkAliasOptionModule [ "xsession" "pointerCursor" "size" ] [
|
(mkAliasOptionModule [ "xsession" "pointerCursor" "size" ] [
|
||||||
"home"
|
"home"
|
||||||
"pointerCursor"
|
"pointerCursor"
|
||||||
"size"
|
"size"
|
||||||
])
|
])
|
||||||
(lib.mkAliasOptionModule [ "xsession" "pointerCursor" "defaultCursor" ] [
|
(mkAliasOptionModule [ "xsession" "pointerCursor" "defaultCursor" ] [
|
||||||
"home"
|
"home"
|
||||||
"pointerCursor"
|
"pointerCursor"
|
||||||
"x11"
|
"x11"
|
||||||
|
|
Loading…
Add table
Reference in a new issue