Compare commits

...

3 commits

11 changed files with 201 additions and 11 deletions

31
home/alacritty.nix Normal file
View file

@ -0,0 +1,31 @@
{ config, lib, ... }:
let
cfg = config.my.home.alacritty;
alacrittyTheme = config.my.theme.alacrittyTheme;
in
{
options.my.home.alacritty.enable = lib.mkEnableOption "Alacritty terminal";
config.programs.alacritty = lib.mkIf cfg.enable {
enable = true;
settings = {
window = {
padding = {
x = 8;
y = 8;
};
decorations = "none";
};
font = {
normal = {
family = "Input Mono Narrow";
};
size = 9.0;
};
colors = alacrittyTheme;
};
};
}

View file

@ -1,6 +1,7 @@
{ ... }: { ... }:
{ {
imports = [ imports = [
./alacritty.nix
./emacs.nix ./emacs.nix
./flameshot.nix ./flameshot.nix
./secrets ./secrets

89
home/themes/alacritty.nix Normal file
View file

@ -0,0 +1,89 @@
{ lib }:
with lib;
let
mkColorOption = import ./color.nix { inherit lib; };
primaryColorModule = types.submodule {
options = {
background = mkColorOption {};
foreground = mkColorOption {};
};
};
cursorColorModule = types.submodule {
options = {
text = mkColorOption {};
cursor = mkColorOption {};
};
};
rainbowColorModule = types.submodule {
options = {
black = mkColorOption {};
red = mkColorOption {};
green = mkColorOption {};
yellow = mkColorOption {};
blue = mkColorOption {};
magenta = mkColorOption {};
cyan = mkColorOption {};
white = mkColorOption {};
};
};
in
types.submodule {
options = {
primary = mkOption {
type = primaryColorModule;
default = {
foreground = "#c5c8c6";
background = "#1d1f21";
};
};
cursor = mkOption {
type = cursorColorModule;
default = {
text = "#1d1f21";
cursor = "#c5c8c6";
};
};
normal = mkOption {
type = rainbowColorModule;
default = {
black = "#1d1f21";
red = "#cc6666";
green = "#b5bd68";
yellow = "#f0c674";
blue = "#81a2be";
magenta = "#b294bb";
cyan = "#8abeb7";
white = "#c5c8c6";
};
};
bright = mkOption {
type = rainbowColorModule;
default = {
black = "#666666";
red = "#d54e53";
green = "#b9ca4a";
yellow = "#e7c547";
blue = "#7aa6da";
magenta = "#c397d8";
cyan = "#70c0b1";
white = "#eaeaea";
};
};
dim = mkOption {
type = rainbowColorModule;
default = {
black = "#131415";
red = "#864343";
green = "#777c44";
yellow = "#9e824c";
blue = "#556a7d";
magenta = "#75617b";
cyan = "#5b7d78";
white = "#828482";
};
};
};
}

View file

@ -3,8 +3,13 @@ with lib;
let let
themeType = types.submodule { themeType = types.submodule {
options = { options = {
alacrittyTheme = mkOption {
type = import ./alacritty.nix { inherit lib; };
default = {};
};
i3Theme = mkOption { i3Theme = mkOption {
type = import ./i3.nix { inherit lib; }; type = import ./i3.nix { inherit lib; };
default = {};
}; };
}; };
}; };
@ -12,6 +17,7 @@ in
{ {
options.my.theme = mkOption { options.my.theme = mkOption {
type = themeType; type = themeType;
default = {};
}; };
options.my.themes = mkOption { options.my.themes = mkOption {

View file

@ -103,6 +103,8 @@ types.submodule {
}; };
}; };
}; };
default = {};
}; };
background = mkOption { background = mkOption {

View file

@ -0,0 +1,39 @@
let
colors = import ./colors.nix;
in
with colors;
{
primary = {
background = base3;
foreground = base00;
};
cursor = {
text = base3;
cursor = base00;
};
normal = {
black = base02;
red = red;
green = green;
yellow = yellow;
blue = blue;
magenta = magenta;
cyan = cyan;
white = base2;
};
bright = {
black = base03;
red = orange;
green = base01;
yellow = base00;
blue = base0;
magenta = violet;
cyan = base1;
white = base3;
};
dim = {};
}

View file

@ -1,12 +1,31 @@
{ {
background = "#282828"; i3 = {
red = "#cc241d"; background = "#282828";
green = "#98971a"; red = "#cc241d";
yellow = "#d79921"; green = "#98971a";
blue = "#458588"; yellow = "#d79921";
purple = "#b16286"; blue = "#458588";
aqua = "#689d68"; purple = "#b16286";
gray = "#a89984"; aqua = "#689d68";
darkGray = "#1d2021"; gray = "#a89984";
white = "#ffffff"; darkGray = "#1d2021";
white = "#ffffff";
};
base03 = "#002b36"; # brblack
base02 = "#073642"; # black
base01 = "#586e75"; # brgreen
base00 = "#657b83"; # bryellow
base0 = "#839496"; # brblue
base1 = "#93a1a1"; # brcyan
base2 = "#eee8d5"; # white
base3 = "#fdf6e3"; # brwhite
yellow = "#b58900"; # yellow
orange = "#cb4b16"; # brred
red = "#dc322f"; # red
magenta = "#d33682"; # magenta
violet = "#6c71c4"; # brmagenta
blue = "#268bd2"; # blue
cyan = "#2aa198"; # cyan
green = "#859900"; # green
} }

View file

@ -1,3 +1,4 @@
{ {
i3Theme = import ./i3.nix; i3Theme = import ./i3.nix;
alacrittyTheme = import ./alacritty.nix;
} }

View file

@ -1,7 +1,7 @@
let let
colors = import ./colors.nix; colors = import ./colors.nix;
in in
with colors; with colors.i3;
{ {
bar = { bar = {
background = background; background = background;

View file

@ -10,5 +10,6 @@ in
config.programs.tmux = lib.mkIf cfg.enable { config.programs.tmux = lib.mkIf cfg.enable {
enable = true; enable = true;
baseIndex = 1; baseIndex = 1;
terminal = "screen-256color";
}; };
} }

View file

@ -4,6 +4,7 @@
# Keyboard settings & i3 settings # Keyboard settings & i3 settings
my.home.x.enable = true; my.home.x.enable = true;
my.home.x.cursor.enable = true; my.home.x.cursor.enable = true;
my.home.alacritty.enable = true;
my.home.emacs.enable = true; my.home.emacs.enable = true;
my.home.tmux.enable = true; my.home.tmux.enable = true;
my.theme = config.home-manager.users.alarsyo.my.themes.solarizedLight; my.theme = config.home-manager.users.alarsyo.my.themes.solarizedLight;