modules: move colors to home/modules
, explicitly import all
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
{ pkgs, lib, extendedLib, inputs, machineVars, colors, ... } @ args: let
|
||||
{ pkgs, lib, extendedLib, inputs, machineVars, ... } @ args: let
|
||||
inherit (lib) mkForce mkIf optionals;
|
||||
graphics = !machineVars.headless;
|
||||
in {
|
||||
inherit machineVars;
|
||||
inherit colors;
|
||||
|
||||
imports = [
|
||||
./shellOptions.nix
|
||||
@@ -25,7 +24,8 @@ in {
|
||||
./programs/tmux.nix
|
||||
./programs/zsh
|
||||
|
||||
../modules
|
||||
../modules/machineVars.nix
|
||||
./modules/colors.nix
|
||||
|
||||
inputs.secrets.outputs.home-config
|
||||
] ++ optionals graphics [
|
||||
|
73
home/modules/colors.nix
Normal file
73
home/modules/colors.nix
Normal file
@@ -0,0 +1,73 @@
|
||||
{ pkgs, lib, config, ... }:
|
||||
let
|
||||
cfg = config.colors;
|
||||
inherit (lib) types mkOption;
|
||||
in {
|
||||
options.colors = let
|
||||
colorType = types.str;
|
||||
|
||||
mkColorOption = mkOption {
|
||||
type = colorType;
|
||||
};
|
||||
|
||||
colorSetType = types.submodule ({ name, ... }: {
|
||||
options = {
|
||||
name = mkOption {
|
||||
type = types.str;
|
||||
default = name;
|
||||
};
|
||||
foreground = mkColorOption;
|
||||
background = mkColorOption;
|
||||
black = mkColorOption;
|
||||
red = mkColorOption;
|
||||
green = mkColorOption;
|
||||
yellow = mkColorOption;
|
||||
blue = mkColorOption;
|
||||
magenta = mkColorOption;
|
||||
cyan = mkColorOption;
|
||||
white = mkColorOption;
|
||||
};
|
||||
});
|
||||
|
||||
in {
|
||||
colorSets = mkOption {
|
||||
type = types.attrsOf colorSetType;
|
||||
};
|
||||
defaultColorSet = mkOption {
|
||||
description = "the default color to use for applications";
|
||||
type = colorSetType;
|
||||
};
|
||||
};
|
||||
|
||||
config.colors = rec {
|
||||
colorSets = {
|
||||
monokai = rec {
|
||||
foreground = white;
|
||||
background = black;
|
||||
black = "#272822";
|
||||
red = "#f92672";
|
||||
green = "#a6e22e";
|
||||
yellow = "#f4bf75";
|
||||
blue = "#66d9ef";
|
||||
magenta = "#ae81ff";
|
||||
cyan = "#a1efe4";
|
||||
white = "#f8f8f2";
|
||||
};
|
||||
|
||||
paper = {
|
||||
background = "#f2e3bd";
|
||||
foreground = "#2f343f";
|
||||
black = "#222222";
|
||||
red = "#C30771";
|
||||
green = "#10A778";
|
||||
yellow = "#A89C14";
|
||||
blue = "#008ec4";
|
||||
magenta = "#523C79";
|
||||
cyan = "#20A5BA";
|
||||
white = "#f7f3ee";
|
||||
};
|
||||
};
|
||||
defaultColorSet = colorSets.monokai;
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user