Skip to content

Commit

Permalink
do the color palette thingy in-house
Browse files Browse the repository at this point in the history
  • Loading branch information
fbegyn committed Jul 9, 2024
1 parent 52de222 commit 0148019
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
3 changes: 2 additions & 1 deletion users/francis/hm/base.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{ config, pkgs, nix-colors, ... }:
{ config, pkgs, ... }:

{
imports = [
./colors.nix
./configurations/git.nix
./configurations/fish
./configurations/bash.nix
Expand Down
40 changes: 40 additions & 0 deletions users/francis/hm/colors.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{ config, pkgs, lib, ... }:

let
hexColorType = lib.mkOptionType {
name = "hex-color";
descriptionClass = "noun";
description = "RGB color in hex format";
check = x: lib.isString x && !(lib.hasPrefix "#" x);
};
in {
options.colorScheme.palette = lib.mkOption {
type = lib.types.attrsOf (
lib.types.coercedTo lib.types.str (lib.removePrefix "#") hexColorType
);
description = ''
Atttribute set describing predefined colors to be used in other places
of the configuration.
'';
};

config.colorScheme.palette = {
base00 = "202020";
base01 = "2a2827";
base02 = "504945";
base03 = "5a524c";
base04 = "bdae93";
base05 = "ddc7a1";
base06 = "ebdbb2";
base07 = "fbf1c7";
base08 = "ea6962";
base09 = "e78a4e";
base0A = "d8a657";
base0B = "a9b665";
base0C = "89b482";
base0D = "7daea3";
base0E = "d3869b";
base0F = "bd6f3e";
};
}

0 comments on commit 0148019

Please sign in to comment.