20 lines
470 B
Nix
20 lines
470 B
Nix
{ lib, pkgs, ... }:
|
|
|
|
{ # The function defining the NixOS module
|
|
flake.nixosModules.fonts = { config, lib, pkgs, ... }:
|
|
|
|
{
|
|
# Define an enable option
|
|
options.mySystem.desktop.fonts.enable =
|
|
lib.mkEnableOption "Enable nerd-fonts";
|
|
|
|
# Only apply config if enabled
|
|
config = lib.mkIf (config.mySystem.desktop.fonts.enable or false) {
|
|
fonts.packages = with pkgs; [
|
|
nerd-fonts.iosevka
|
|
nerd-fonts.fira-code
|
|
];
|
|
};
|
|
};
|
|
}
|