refactor(flake-parts): initial flake-parts configuration
This commit is contained in:
parent
8f67be9e68
commit
5603001d65
230 changed files with 380 additions and 717 deletions
|
|
@ -1,43 +0,0 @@
|
|||
{ lib, config, ... }:
|
||||
let
|
||||
cfg = config.homeModules.desktop.terminal;
|
||||
in
|
||||
{
|
||||
|
||||
imports = [
|
||||
./foot
|
||||
./kitty
|
||||
];
|
||||
|
||||
options.homeModules.desktop.terminal = {
|
||||
foot = {
|
||||
enable = lib.mkEnableOption "Enable foot terminal";
|
||||
default = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Set foot as default terminal in environment variables";
|
||||
};
|
||||
};
|
||||
kitty = {
|
||||
enable = lib.mkEnableOption "Enable kitty terminal";
|
||||
default = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Set kitty as default terminal in environment variables";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
assertions = [
|
||||
{
|
||||
assertion =
|
||||
(lib.length (lib.filter (x: x) [
|
||||
cfg.foot.default or false
|
||||
cfg.kitty.default or false
|
||||
]) <= 1);
|
||||
message = "Only one terminal can be default in the configuration";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
@ -1,71 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
let
|
||||
inherit (config.colorscheme) colors;
|
||||
fonts = config.homeModules.theme.fonts;
|
||||
cfg = config.homeModules.desktop.terminal.foot;
|
||||
in
|
||||
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.sessionVariables = lib.mkIf cfg.default {
|
||||
TERMINAL = "foot";
|
||||
TERM = "foot";
|
||||
};
|
||||
programs.foot = {
|
||||
enable = true;
|
||||
server.enable = true;
|
||||
settings = {
|
||||
main = {
|
||||
font = "${fonts.monospace.family}:pixelsize=18:antialias=true";
|
||||
font-bold = "${fonts.monospace.family}:style=Bold:pixelsize=18:antialias=true";
|
||||
font-italic = "${fonts.monospace.family}:style=Italic:pixelsize=18:antialias=true";
|
||||
font-bold-italic = "${fonts.monospace.family}:style=Bold Italic:pixelsize=18:antialias=true";
|
||||
dpi-aware = "yes";
|
||||
letter-spacing = "-1px";
|
||||
bold-text-in-bright = "palette-based";
|
||||
resize-delay-ms = "80";
|
||||
pad = "9x9 center";
|
||||
selection-target = "clipboard";
|
||||
};
|
||||
|
||||
tweak = {
|
||||
sixel = "yes";
|
||||
font-monospace-warn = "no";
|
||||
};
|
||||
|
||||
cursor = {
|
||||
style = "beam";
|
||||
blink = "yes";
|
||||
};
|
||||
colors = {
|
||||
alpha = 1.0;
|
||||
foreground = "${colors.base05}";
|
||||
background = "${colors.base00}";
|
||||
regular0 = "${colors.base00}"; # black
|
||||
regular1 = "${colors.base08}"; # red
|
||||
regular2 = "${colors.base0B}"; # green
|
||||
regular3 = "${colors.base0A}"; # yellow
|
||||
regular4 = "${colors.base0D}"; # blue
|
||||
regular5 = "${colors.base0E}"; # magenta
|
||||
regular6 = "${colors.base0C}"; # cyan
|
||||
regular7 = "${colors.base05}"; # white
|
||||
bright0 = "${colors.base03}"; # bright black
|
||||
bright1 = "${colors.base08}"; # bright red
|
||||
bright2 = "${colors.base0B}"; # bright green
|
||||
bright3 = "${colors.base0A}"; # bright yellow
|
||||
bright4 = "${colors.base0D}"; # bright blue
|
||||
bright5 = "${colors.base0E}"; # bright magenta
|
||||
bright6 = "${colors.base0C}"; # bright cyan
|
||||
bright7 = "${colors.base07}"; # bright white
|
||||
"16" = "${colors.base09}";
|
||||
"17" = "${colors.base0F}";
|
||||
"18" = "${colors.base01}";
|
||||
"19" = "${colors.base02}";
|
||||
"20" = "${colors.base04}";
|
||||
"21" = "${colors.base06}";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,66 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
let
|
||||
inherit (config.colorscheme) colors;
|
||||
fonts = config.homeModules.theme.font;
|
||||
cfg = config.homeModules.desktop.terminal.kitty;
|
||||
fish = config.homeModules.console.shell.fish;
|
||||
in
|
||||
{
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.sessionVariables = lib.mkIf cfg.default {
|
||||
TERMINAL = "kitty -1";
|
||||
TERM = "kitty -1";
|
||||
};
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
font = {
|
||||
name = fonts.monospace.family;
|
||||
size = 12;
|
||||
};
|
||||
shellIntegration.enableFishIntegration = lib.mkif fish.enable true;
|
||||
settings = {
|
||||
scrollback_lines = 4000;
|
||||
scrollback_pager_history_size = 2048;
|
||||
window_padding_width = 1;
|
||||
foreground = "#${colors.base05}";
|
||||
background = "#${colors.base00}";
|
||||
background_opacity = "1.0";
|
||||
selection_background = "#${colors.base05}";
|
||||
selection_foreground = "#${colors.base00}";
|
||||
url_color = "#${colors.base04}";
|
||||
cursor = "#${colors.base05}";
|
||||
active_border_color = "#${colors.base03}";
|
||||
inactive_border_color = "#${colors.base01}";
|
||||
active_tab_background = "#${colors.base00}";
|
||||
active_tab_foreground = "#${colors.base05}";
|
||||
inactive_tab_background = "#${colors.base01}";
|
||||
inactive_tab_foreground = "#${colors.base04}";
|
||||
tab_bar_background = "#${colors.base01}";
|
||||
color0 = "#${colors.base00}";
|
||||
color1 = "#${colors.base08}";
|
||||
color2 = "#${colors.base0B}";
|
||||
color3 = "#${colors.base0A}";
|
||||
color4 = "#${colors.base0D}";
|
||||
color5 = "#${colors.base0E}";
|
||||
color6 = "#${colors.base0C}";
|
||||
color7 = "#${colors.base05}";
|
||||
color8 = "#${colors.base03}";
|
||||
color9 = "#${colors.base08}";
|
||||
color10 = "#${colors.base0B}";
|
||||
color11 = "#${colors.base0A}";
|
||||
color12 = "#${colors.base0D}";
|
||||
color13 = "#${colors.base0E}";
|
||||
color14 = "#${colors.base0C}";
|
||||
color15 = "#${colors.base07}";
|
||||
color16 = "#${colors.base09}";
|
||||
color17 = "#${colors.base0F}";
|
||||
color18 = "#${colors.base01}";
|
||||
color19 = "#${colors.base02}";
|
||||
color20 = "#${colors.base04}";
|
||||
color21 = "#${colors.base06}";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue