Compare commits
No commits in common. "bd92076291f07343bd965419fbb2e3b1ac58e0af" and "b4653b20a238f5291959efca9471045a3f678078" have entirely different histories.
bd92076291
...
b4653b20a2
|
@ -30,30 +30,6 @@ let
|
|||
nerdfontPkgs = builtins.map
|
||||
(f: pkgs.nerdfonts.override { fonts = [ f ]; })
|
||||
wantedNerdfonts;
|
||||
|
||||
# see: <repo:nixos/nixpkgs:nixos/modules/config/fonts/fontconfig.nix>
|
||||
# and: <repo:nixos/nixpkgs:pkgs/development/libraries/fontconfig/make-fonts-cache.nix>
|
||||
# nixpkgs creates a fontconfig cache, but only when *not* cross compiling.
|
||||
# but the alternative is that fonts are cached purely at runtime, in ~/.cache/fontconfig,
|
||||
# and that needs to either be added to the sandbox of *every* app,
|
||||
# or font-heavy apps are several *seconds* slower to launch.
|
||||
#
|
||||
# TODO: upstream this into `make-fonts-cache.nix`?
|
||||
cache = (pkgs.makeFontsCache { fontDirectories = config.fonts.packages; }).overrideAttrs (upstream: {
|
||||
buildCommand = lib.replaceStrings
|
||||
[ "fc-cache" ]
|
||||
[ "${pkgs.stdenv.hostPlatform.emulator pkgs.buildPackages} ${pkgs.fontconfig.bin}/bin/fc-cache" ]
|
||||
upstream.buildCommand
|
||||
;
|
||||
});
|
||||
cacheConf = pkgs.writeTextDir "etc/fonts/conf.d/01-nixos-cache-cross.conf" ''
|
||||
<?xml version='1.0'?>
|
||||
<!DOCTYPE fontconfig SYSTEM 'urn:fontconfig:fonts.dtd'>
|
||||
<fontconfig>
|
||||
<!-- Pre-generated font caches -->
|
||||
<cachedir>${cache}</cachedir>
|
||||
</fontconfig>
|
||||
'';
|
||||
in
|
||||
{
|
||||
sane.programs.fontconfig = {
|
||||
|
@ -88,8 +64,6 @@ in
|
|||
"DejaVu Sans"
|
||||
];
|
||||
};
|
||||
# nixpkgs builds a cache file, but only for non-cross. i want it always, so add my own cache -- but ONLY for cross.
|
||||
fontconfig.confPackages = lib.mkIf (pkgs.stdenv.hostPlatform != pkgs.stdenv.buildPlatform) [ cacheConf ];
|
||||
#vvv enables dejavu_fonts, freefont_ttf, gyre-fonts, liberation_ttf, unifont, noto-fonts-emoji
|
||||
enableDefaultPackages = false;
|
||||
packages = with pkgs; [
|
||||
|
|
|
@ -215,7 +215,7 @@ dispatchOn() {
|
|||
|
||||
dispatchInhibited() {
|
||||
case "$action" in
|
||||
"power_tap_1_hold")
|
||||
"power_hold")
|
||||
# power hold: escape hatch in case rofi has hung
|
||||
handleWith killall -9 rofi
|
||||
;;
|
||||
|
|
Loading…
Reference in New Issue
Block a user