-
|
Hello! I would like to use some purchased fonts, but encrypt them using agenix or sops-nix. Is it currently possible to specify a font directory of sorts, or is there any advice you can give me on how use manage these fonts between machines without resorting to a private repository? Since agenix and sops-nix don't support build-time secrets, I can't build the font packages either. Thank you kindly for the help, and sorry if this sounds confusing! I'll clarify however I can if asked. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
I use agenix, but IIRC sops-nix works essentially the same. Essentially, because the Nix store is world-readable, decrypting secrets inside Nix expressions is unacceptable. Instead, the encrypted secrets should be written to the Nix store and applications read run time decrypted files outside the Nix store at run time. Practically, the agenix deamon decrypts secrets into In other words, unless applications support reading values from the filesystem, this is impossible at the Nix level without compromising security. Unless all Stylix modules happen to support this, Stylix can only support some applications, resulting in confusing behavior. It might be better to consider this out-of-scope for Stylix, although you can manually support applications this way yourself. Take a look at nix-community/home-manager#5819 as a possible workaround for allowing applications to read values from the filesystem. Keep in mind that wrapping applications with something like |
Beta Was this translation helpful? Give feedback.
IIRC, based on nix-community/home-manager#2732, the NixOS and Home Manager modules generate a configuration file to declare
fc-match's font mapping. Beyond that, fonts can be configured as usual, although the configuration file is the most Nix idiomatic approach.That might be the simplest workaround.