refactor(home-manager modules): moved home-manager module: fonts, monitors, wallpapaer to home/modules/config

This commit is contained in:
ooks-io 2024-02-26 17:23:07 +13:00
parent 3337488840
commit 902f5b5f0f
8 changed files with 9 additions and 8 deletions

View file

@ -0,0 +1,32 @@
{ lib, config, ... }:
let
mkFontOption = kind: {
family = 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";
};
};
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 ];
};
}