hyprland safe escape with stylix + fonts flake
This commit is contained in:
@@ -2,13 +2,30 @@
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
customFonts = pkgs.stdenvNoCC.mkDerivation {
|
||||
name = "custom-fonts";
|
||||
src = inputs.fonts;
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/fonts
|
||||
find $src -type f \( \
|
||||
-name "*.ttf" -o \
|
||||
-name "*.otf" -o \
|
||||
-name "*.woff" -o \
|
||||
-name "*.woff2" \
|
||||
\) -exec cp {} $out/share/fonts/ \;
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
options.my.apps.fonts.enable = lib.mkEnableOption "additional fonts and typography";
|
||||
config = lib.mkIf config.my.apps.fonts.enable {
|
||||
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "corefonts" ];
|
||||
fonts.packages = builtins.attrValues {
|
||||
inherit customFonts;
|
||||
inherit (pkgs)
|
||||
symbola
|
||||
comic-neue
|
||||
|
||||
Reference in New Issue
Block a user