more changes to the x1 system config & added font home-manager module credit to misterio77
This commit is contained in:
parent
04ec7debc9
commit
cd8b4270f4
6 changed files with 63 additions and 92 deletions
32
modules/home-manager/fonts.nix
Normal file
32
modules/home-manager/fonts.nix
Normal 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 ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue