fontconfig: set defaultFonts with mkOrder 600
Just for reference: ```nix mkBefore = mkOrder 500; defaultOrderPriority = 1000; mkAfter = mkOrder 1500; ```
This commit is contained in:
parent
f2711be0a3
commit
7abe83d1ed
8 changed files with 23 additions and 5 deletions
|
|
@ -1,16 +1,17 @@
|
|||
{ mkTarget, lib, ... }:
|
||||
{ mkTarget }:
|
||||
{ lib, ... }:
|
||||
mkTarget {
|
||||
name = "fontconfig";
|
||||
humanName = "Fontconfig";
|
||||
|
||||
configElements =
|
||||
{ fonts }:
|
||||
{ listTargetIndex, fonts }:
|
||||
{
|
||||
fonts.fontconfig.defaultFonts = lib.genAttrs [
|
||||
"monospace"
|
||||
"serif"
|
||||
"sansSerif"
|
||||
"emoji"
|
||||
] (family: [ fonts.${family}.name ]);
|
||||
] (family: lib.mkOrder listTargetIndex [ fonts.${family}.name ]);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{ lib, mkTarget, ... }:
|
||||
{
|
||||
imports = [
|
||||
(lib.modules.importApply ./fontconfig.nix { inherit mkTarget lib; })
|
||||
(lib.modules.importApply ./fontconfig.nix { inherit mkTarget; })
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{ lib, mkTarget, ... }:
|
||||
{
|
||||
imports = [
|
||||
(lib.modules.importApply ./fontconfig.nix { inherit mkTarget lib; })
|
||||
(lib.modules.importApply ./fontconfig.nix { inherit mkTarget; })
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ in
|
|||
../target.nix
|
||||
../release.nix
|
||||
../overlays.nix
|
||||
../ordering.nix
|
||||
] ++ autoload;
|
||||
config.warnings =
|
||||
lib.mkIf
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ in
|
|||
../pixel.nix
|
||||
../target.nix
|
||||
../overlays.nix
|
||||
../ordering.nix
|
||||
] ++ autoload;
|
||||
|
||||
# See https://github.com/nix-community/nix-on-droid/issues/436
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ in
|
|||
../target.nix
|
||||
../release.nix
|
||||
../overlays.nix
|
||||
../ordering.nix
|
||||
] ++ autoload;
|
||||
config.warnings =
|
||||
lib.mkIf
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ in
|
|||
../target.nix
|
||||
../release.nix
|
||||
../overlays.nix
|
||||
../ordering.nix
|
||||
] ++ autoload;
|
||||
config.warnings =
|
||||
lib.mkIf
|
||||
|
|
|
|||
13
stylix/ordering.nix
Normal file
13
stylix/ordering.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
options.stylix.listTargetIndex = lib.mkOption {
|
||||
description = ''
|
||||
The target index at which stylix inserts into lists.
|
||||
Intended for use as argument to `lib.mkOrder`.
|
||||
'';
|
||||
type = lib.types.int;
|
||||
default = 600;
|
||||
internal = true;
|
||||
readOnly = true;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue