Add color theme

This commit is contained in:
Riley Apeldoorn 2023-05-21 22:09:59 +00:00
parent 9076fb4c20
commit b4aee45e39
5 changed files with 178 additions and 5 deletions

View file

@ -7,7 +7,10 @@
./git.nix
./nix.nix
./programs.nix
./theme.nix
./gui
];
config.theme = import ../../themes/lean.nix;
}

61
shared/home/theme.nix Normal file
View file

@ -0,0 +1,61 @@
{ lib, ... }:
with lib;
with types;
let colorOpt = mkOption {
type = submodule {
options = {
basic = mkOption { type = str; };
major = mkOption { type = str; };
minor = mkOption { type = str; };
};
};
};
in {
options.theme = mkOption {
type = submodule {
options = {
background = colorOpt;
foreground = colorOpt;
failure = mkOption { type = str; };
success = mkOption { type = str; };
warning = mkOption { type = str; };
accent = mkOption {
type = submodule {
options = {
primary = colorOpt;
secondary = colorOpt;
tertiary = colorOpt;
ordered = listToAttrs
(genList (n: { name = "${n}"; value = colorOpt; }) 8);
};
};
};
colors = mkOption {
description = ''
Colors by their name.
'';
type = submodule {
options = {
red = colorOpt;
green = colorOpt;
blue = colorOpt;
cyan = colorOpt;
purple = colorOpt;
pink = colorOpt;
yellow = colorOpt;
orange = colorOpt;
};
};
};
};
};
};
}

21
system/dev-lt-63/term.nix Normal file
View file

@ -0,0 +1,21 @@
{ pkgs, config, ... }:
let theme = config.theme; in {
programs.kitty = {
enable = true;
settings = {
term = "xterm";
enable_audio_bell = false;
scrollback_lines = 5000000;
background = theme.background.basic;
};
font = {
name = "Fira Code";
package = pkgs.fira-code;
};
};
}

View file

@ -43,9 +43,7 @@
fsType = "vfat";
};
#TODO
swapDevices = [
{device = "/dev/nixos/swap";}
];
swapDevices = [
{ device = "/dev/nixos/swap"; }
];
}

90
themes/lean.nix Normal file
View file

@ -0,0 +1,90 @@
rec {
background = {
basic = "121212";
major = "010101";
minor = "212121";
};
foreground = {
basic = "f5f5f5";
major = "ffffff";
minor = "ebebeb";
};
failure = colors.red.major;
success = colors.green.major;
warning = colors.orange.basic;
colors = {
red = {
basic = "f0593e";
major = "ff3814";
minor = "ff8873";
};
green = {
basic = "2aa61c";
major = "39e825";
minor = "72eb65";
};
blue = {
basic = "3171eb";
major = "4160fa";
minor = "73a0f5";
};
cyan = {
basic = "42cef5";
major = "42f5f2";
minor = "91e7ff";
};
purple = {
basic = "9d24bf";
major = "ca45f0";
minor = "e28efa";
};
pink = {
basic = "f25ac0";
major = "f71eaf";
minor = "f781d0";
};
yellow = {
basic = "d3e848";
major = "d7f700";
minor = "dbe884";
};
orange = {
basic = "f7a100";
major = "f77700";
minor = "f5b742";
};
};
accent = rec {
primary = colors.green;
secondary = colors.purple;
tertiary = colors.pink;
ordered = with colors; {
"0" = primary;
"1" = secondary;
"2" = tertiary;
"3" = blue;
"4" = red;
"5" = orange;
"6" = yellow;
"7" = cyan;
};
};
}