feat: renamed computers to hosts
This commit is contained in:
parent
f6af310a18
commit
b03c70b486
34 changed files with 5 additions and 6 deletions
|
@ -1,80 +0,0 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
cfg = config.alqueva.fonts;
|
||||
inherit (lib) types mkOption;
|
||||
mkStringsOption = default: letterform:
|
||||
mkOption {
|
||||
type = types.listOf types.str;
|
||||
inherit default;
|
||||
description = "The default fonts for ${letterform}.";
|
||||
};
|
||||
mkPackagesOption = default: letterform:
|
||||
mkOption {
|
||||
type = types.listOf types.package;
|
||||
inherit default;
|
||||
description = "The packages you want to use for your ${letterform} fonts.";
|
||||
};
|
||||
in {
|
||||
options.alqueva.fonts = {
|
||||
enable = lib.mkEnableOption "" // {description = "Whether you want to use this fonts module.";};
|
||||
packages =
|
||||
{
|
||||
extra = mkOption {
|
||||
type = types.listOf types.package;
|
||||
default = [];
|
||||
description = "Extra font packages you want installed.";
|
||||
};
|
||||
}
|
||||
// builtins.mapAttrs (_n: v: mkPackagesOption v.default v.letterform) {
|
||||
sansSerif = {
|
||||
default = [pkgs.roboto];
|
||||
letterform = "sans-serif";
|
||||
};
|
||||
monospace = {
|
||||
default = [pkgs.roboto-mono];
|
||||
letterform = "monospace";
|
||||
};
|
||||
serif = {
|
||||
default = [pkgs.roboto-serif];
|
||||
letterform = "serif";
|
||||
};
|
||||
emoji = {
|
||||
default = [pkgs.noto-fonts-color-emoji];
|
||||
letterform = "emoji";
|
||||
};
|
||||
};
|
||||
names = builtins.mapAttrs (_n: v: mkStringsOption v.default v.letterform) {
|
||||
sansSerif = {
|
||||
default = ["Roboto"];
|
||||
letterform = "sans-serif";
|
||||
};
|
||||
monospace = {
|
||||
default = ["Roboto Mono"];
|
||||
letterform = "monospace";
|
||||
};
|
||||
serif = {
|
||||
default = ["Roboto Serif"];
|
||||
letterform = "serif";
|
||||
};
|
||||
emoji = {
|
||||
default = ["Noto Color Emoji"];
|
||||
letterform = "emoji";
|
||||
};
|
||||
};
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
fonts = {
|
||||
packages = builtins.concatLists (builtins.attrValues cfg.packages);
|
||||
fontconfig = {
|
||||
defaultFonts = {
|
||||
inherit (cfg.names) sansSerif monospace serif emoji;
|
||||
};
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue