From e85f75e7edebd928863f725a2ddd440fd22a2017 Mon Sep 17 00:00:00 2001 From: Joerg Thalheim Date: Sat, 7 Oct 2017 16:43:18 +0100 Subject: [PATCH] fonts: add module --- modules/config/fonts.nix | 21 +++++++++++++++++++++ modules/default.nix | 1 + 2 files changed, 22 insertions(+) create mode 100644 modules/config/fonts.nix diff --git a/modules/config/fonts.nix b/modules/config/fonts.nix new file mode 100644 index 00000000..ed2504ea --- /dev/null +++ b/modules/config/fonts.nix @@ -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 ]; + }; + }; +} diff --git a/modules/default.nix b/modules/default.nix index ab7b1065..373aeb63 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -16,6 +16,7 @@ let ./misc/gtk.nix ./misc/news.nix ./misc/pam.nix + ./config/fonts.nix ./programs/bash.nix ./programs/beets.nix ./programs/browserpass.nix