fonts: add module

This commit is contained in:
Joerg Thalheim 2017-10-07 16:43:18 +01:00
parent 469caa1a14
commit e85f75e7ed
2 changed files with 22 additions and 0 deletions

21
modules/config/fonts.nix Normal file
View file

@ -0,0 +1,21 @@
{ config, lib, pkgs, ... }:
with lib;
{
options = {
fonts.fonts = mkOption {
type = types.listOf types.path;
default = [ ];
example = literalExample "[ pkgs.dejavu_fonts ]";
description = "List of primary font paths";
};
};
config = mkIf (config.fonts.fonts != []) {
home.file.".local/share/fonts".source = pkgs.symlinkJoin {
name = "fonts";
paths = [ config.fonts.fonts ];
};
};
}

View file

@ -16,6 +16,7 @@ let
./misc/gtk.nix ./misc/gtk.nix
./misc/news.nix ./misc/news.nix
./misc/pam.nix ./misc/pam.nix
./config/fonts.nix
./programs/bash.nix ./programs/bash.nix
./programs/beets.nix ./programs/beets.nix
./programs/browserpass.nix ./programs/browserpass.nix