mirror of
https://github.com/LnL7/nix-darwin.git
synced 2025-03-13 20:30:02 +00:00
re-add fonts on every rebuild
This commit is contained in:
parent
7a7cbdc165
commit
b10e114e33
1 changed files with 3 additions and 2 deletions
|
@ -23,15 +23,16 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enableFontDir {
|
||||
config = {
|
||||
system.build.fonts = pkgs.buildEnv {
|
||||
name = "system-fonts";
|
||||
paths = cfg.fonts;
|
||||
pathsToLink = "/share/fonts/truetype";
|
||||
};
|
||||
system.activationScripts.fonts.text = ''
|
||||
system.activationScripts.fonts.text = optionalString cfg.enableFontDir ''
|
||||
# Set up fonts.
|
||||
echo "setting up fonts..." >&2
|
||||
fontrestore default -n 2>&1 | grep -o '/Library/Fonts/.*' | tr '\n' '\0' | xargs -0 sudo rm
|
||||
/bin/ln -hf ${config.system.build.fonts}/share/fonts/truetype/* /Library/Fonts/
|
||||
'';
|
||||
environment.pathsToLink = [ "/share/fonts/truetype" ];
|
||||
|
|
Loading…
Add table
Reference in a new issue