summaryrefslogtreecommitdiff
path: root/modules/common/common/stylix.nix
blob: f1b8f81436ef03fd4a4167d778f8f8db51c36b6b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
{ lib, pkgs, ... }:
with lib;
{
  imports = [
    (mkAliasOptionModule [ "colors" ] [
      "lib"
      "stylix"
      "colors"
    ])
  ];

  options.nixfiles.modules.common.stylix.fonts.extraPackages = mkOption {
    description = "Font packages.";
    default = with pkgs; [
      font-awesome
      noto-fonts
      noto-fonts-emoji
      sarasa-gothic
      source-han-mono
      source-han-sans
      source-han-serif
      twitter-color-emoji
    ];
    readOnly = true;
  };

  # Styling and color binding can be sourced from here[1].
  #
  # [1]: https://github.com/tinted-theming/base24/blob/master/styling.md
  config.stylix = {
    image = pkgs.fetchurl {
      url = "https://upload.wikimedia.org/wikipedia/commons/a/a5/Bonaparte_ante_la_Esfinge%2C_por_Jean-Léon_Gérôme.jpg";
      sha256 = "sha256-qWv52oT8cF9K4ZoeawmR3jgoGB2ARfjbKKc12IljUcM=";
    };

    base16Scheme = "${pkgs.base16-schemes}/share/themes/tomorrow.yaml";

    fonts = {
      monospace = {
        package = pkgs.iosevka;
        name = "Iosevka";
      };

      serif = {
        package = pkgs.iosevka-bin.override { variant = "Etoile"; };
        name = "Iosevka Etoile";
      };

      sansSerif = {
        package = pkgs.iosevka-bin.override { variant = "Aile"; };
        name = "Iosevka Aile";
      };

      sizes = {
        desktop = 10;
        applications = 10;
        terminal = 12;
      };
    };
  };
}