mirror of
https://github.com/Theaninova/TheaninovOS.git
synced 2025-12-13 03:56:24 +00:00
refactor: make the whole thing more generic
This commit is contained in:
26
modules/nixos/fonts/nerdfonts.nix
Normal file
26
modules/nixos/fonts/nerdfonts.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
{ pkgs, lib, config, ... }:
|
||||
with lib;
|
||||
|
||||
let cfg = config.fonts.nerdfonts;
|
||||
|
||||
in {
|
||||
options.fonts.nerdfonts = {
|
||||
enable = mkEnableOption "Enable nerdfonts";
|
||||
additionalFonts = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ ];
|
||||
description = "Additional fonts to include in the nerdfonts package";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
fonts = {
|
||||
packages = with pkgs;
|
||||
[
|
||||
(nerdfonts.override {
|
||||
fonts = [ "NerdFontsSymbolsOnly" ] ++ cfg.additionalFonts;
|
||||
})
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user