Add real home-manager and nixos modules

This commit is contained in:
2025-04-22 21:24:36 +02:00
parent 2e20534bba
commit 63c3d1af27
4 changed files with 115 additions and 0 deletions

View File

@ -0,0 +1,43 @@
{
lib,
config,
...
}:
let
mkFontOption = kind: {
name = lib.mkOption {
type = lib.types.str;
default = null;
description = "Family name for ${kind} font profile";
example = "Fira Code";
};
package = lib.mkOption {
type = lib.types.package;
default = null;
description = "Package for ${kind} font profile";
example = "pkgs.fira-code";
};
size = lib.mkOption {
type = lib.types.int;
default = 12;
description = "Size in pixels for ${kind} font profile";
example = "14";
};
};
cfg = config.fontProfiles;
in
{
options.fontProfiles = {
enable = lib.mkEnableOption "Whether to enable font profiles";
monospace = mkFontOption "monospace";
regular = mkFontOption "regular";
};
config = lib.mkIf cfg.enable {
fonts.fontconfig.enable = true;
home.packages = [
cfg.monospace.package
cfg.regular.package
];
};
}