diff --git a/modules/fontconfig/fontconfig.nix b/modules/fontconfig/fontconfig.nix index eb43c8f4..b2fadd2c 100644 --- a/modules/fontconfig/fontconfig.nix +++ b/modules/fontconfig/fontconfig.nix @@ -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 ]); }; } diff --git a/modules/fontconfig/hm.nix b/modules/fontconfig/hm.nix index 69c11182..9e14cdbc 100644 --- a/modules/fontconfig/hm.nix +++ b/modules/fontconfig/hm.nix @@ -1,6 +1,6 @@ { lib, mkTarget, ... }: { imports = [ - (lib.modules.importApply ./fontconfig.nix { inherit mkTarget lib; }) + (lib.modules.importApply ./fontconfig.nix { inherit mkTarget; }) ]; } diff --git a/modules/fontconfig/nixos.nix b/modules/fontconfig/nixos.nix index 69c11182..9e14cdbc 100644 --- a/modules/fontconfig/nixos.nix +++ b/modules/fontconfig/nixos.nix @@ -1,6 +1,6 @@ { lib, mkTarget, ... }: { imports = [ - (lib.modules.importApply ./fontconfig.nix { inherit mkTarget lib; }) + (lib.modules.importApply ./fontconfig.nix { inherit mkTarget; }) ]; } diff --git a/stylix/darwin/default.nix b/stylix/darwin/default.nix index 21c76cdd..af8f992d 100644 --- a/stylix/darwin/default.nix +++ b/stylix/darwin/default.nix @@ -17,6 +17,7 @@ in ../target.nix ../release.nix ../overlays.nix + ../ordering.nix ] ++ autoload; config.warnings = lib.mkIf diff --git a/stylix/droid/default.nix b/stylix/droid/default.nix index 0f985d99..95bc1902 100644 --- a/stylix/droid/default.nix +++ b/stylix/droid/default.nix @@ -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 diff --git a/stylix/hm/default.nix b/stylix/hm/default.nix index 78f12e1c..793494c8 100644 --- a/stylix/hm/default.nix +++ b/stylix/hm/default.nix @@ -20,6 +20,7 @@ in ../target.nix ../release.nix ../overlays.nix + ../ordering.nix ] ++ autoload; config.warnings = lib.mkIf diff --git a/stylix/nixos/default.nix b/stylix/nixos/default.nix index 64b433f6..33e52063 100644 --- a/stylix/nixos/default.nix +++ b/stylix/nixos/default.nix @@ -19,6 +19,7 @@ in ../target.nix ../release.nix ../overlays.nix + ../ordering.nix ] ++ autoload; config.warnings = lib.mkIf diff --git a/stylix/ordering.nix b/stylix/ordering.nix new file mode 100644 index 00000000..89fbf350 --- /dev/null +++ b/stylix/ordering.nix @@ -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; + }; +}