diff options
author | Tim Keller <tjk@tjkeller.xyz> | 2025-06-29 16:31:55 -0500 |
---|---|---|
committer | Tim Keller <tjk@tjkeller.xyz> | 2025-06-29 16:31:55 -0500 |
commit | 2e415efb8586b88b81de8bd80417bca13a9eb747 (patch) | |
tree | 488d23c2bb6f2f01403b5495c05a87268ee56ffd /modules/home | |
parent | a8d1091e0103e2a71d7868bb7fc35961c15f6edc (diff) | |
download | nixos-2e415efb8586b88b81de8bd80417bca13a9eb747.tar.xz nixos-2e415efb8586b88b81de8bd80417bca13a9eb747.zip |
st can be themed by home manager itself now
Diffstat (limited to 'modules/home')
-rw-r--r-- | modules/home/theme-st.nix | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/modules/home/theme-st.nix b/modules/home/theme-st.nix new file mode 100644 index 0000000..bc22791 --- /dev/null +++ b/modules/home/theme-st.nix @@ -0,0 +1,22 @@ +{ config, lib, pkgs, ... }: { + options = { + theme.st = { + enable = lib.mkEnableOption "enables theming st with home manager"; + font = lib.mkOption { + type = lib.types.str; + default = "JetBrainsMonoNL Nerd Font Mono:size=12:antialias=true:autohint=true"; + }; + }; + }; + config = let + themed-st = pkgs.st.overrideAttrs (old: { + buildInputs = old.buildInputs or [] ++ [ pkgs.makeWrapper ]; + postInstall = old.postInstall or "" + '' + wrapProgram $out/bin/st \ + --add-flags '-f${config.theme.st.font}' + ''; + }); + in { + home.packages = [ themed-st ]; + }; +} |