From 9cc94a838526b4432adcfe030b6d70f464913d9c Mon Sep 17 00:00:00 2001 From: Ayman Boukraa Date: Tue, 3 Mar 2026 21:36:20 +0100 Subject: [PATCH] feat: multi-machine structure + gruvbox theme + kitty + zsh modules --- flake.nix | 23 ++++++++++++- home/base.nix | 10 ++++++ home/modules/kitty.nix | 68 ++++++++++++++++++++++++++++++++++++++ home/modules/theme.nix | 38 +++++++++++++++++++++ home/modules/zsh.nix | 33 ++++++++++++++++++ home/profiles/desktop.nix | 7 ++++ home/profiles/notebook.nix | 8 +++++ home/profiles/server.nix | 8 +++++ result | 1 + 9 files changed, 195 insertions(+), 1 deletion(-) create mode 100644 home/modules/kitty.nix create mode 100644 home/modules/theme.nix create mode 100644 home/modules/zsh.nix create mode 100644 home/profiles/desktop.nix create mode 100644 home/profiles/notebook.nix create mode 100644 home/profiles/server.nix create mode 120000 result diff --git a/flake.nix b/flake.nix index 9e8f4e0..1744930 100644 --- a/flake.nix +++ b/flake.nix @@ -20,10 +20,31 @@ in { homeConfigurations = { + "ayman@archThinkpad" = mkHome { system = "x86_64-linux"; - modules = [ ./home/base.nix ]; + modules = [ + ./home/base.nix + ./home/profiles/notebook.nix + ]; }; + + "ayman@desktop" = mkHome { + system = "x86_64-linux"; + modules = [ + ./home/base.nix + ./home/profiles/desktop.nix + ]; + }; + + "ayman@homelab-01" = mkHome { + system = "x86_64-linux"; + modules = [ + ./home/base.nix + ./home/profiles/server.nix + ]; + }; + }; }; } diff --git a/home/base.nix b/home/base.nix index 3da26c6..071c846 100644 --- a/home/base.nix +++ b/home/base.nix @@ -7,9 +7,19 @@ programs.home-manager.enable = true; + imports = [ + ./modules/theme.nix + ./modules/zsh.nix + ./modules/kitty.nix + ]; + home.packages = with pkgs; [ ripgrep fd bat + eza + fzf + jq + bottom ]; } diff --git a/home/modules/kitty.nix b/home/modules/kitty.nix new file mode 100644 index 0000000..f84a2d6 --- /dev/null +++ b/home/modules/kitty.nix @@ -0,0 +1,68 @@ +{ config, pkgs, ... }: + +let + c = config.theme.colors; +in +{ + programs.kitty = { + enable = true; + + font = { + name = "JetBrains Mono"; + size = 12; + }; + + settings = { + # Colors + background = c.bg; + foreground = c.fg; + selection_background = c.bg2; + selection_foreground = c.fg; + cursor = c.fg; + cursor_text_color = c.bg; + url_color = c.blue_b; + + color0 = c.bg1; color8 = c.bg2; + color1 = c.red; color9 = c.red_b; + color2 = c.green; color10 = c.green_b; + color3 = c.yellow; color11 = c.yellow_b; + color4 = c.blue; color12 = c.blue_b; + color5 = c.purple; color13 = c.purple_b; + color6 = c.aqua; color14 = c.aqua_b; + color7 = c.fg4; color15 = c.fg1; + + # Window + window_padding_width = 12; + background_opacity = "1.0"; + background_blur = 32; + hide_window_decorations = "yes"; + + # Cursor + cursor_shape = "block"; + cursor_blink_interval = 1; + + # Scrollback + scrollback_lines = 3000; + + # Selection + copy_on_select = "yes"; + strip_trailing_spaces = "smart"; + + # Tab bar + tab_bar_style = "powerline"; + tab_bar_align = "left"; + tab_bar_edge = "top"; + + # Shell integration + shell_integration = "enabled"; + }; + + keybindings = { + "ctrl+shift+n" = "new_window"; + "ctrl+t" = "new_tab"; + "ctrl+plus" = "change_font_size all +1.0"; + "ctrl+minus" = "change_font_size all -1.0"; + "ctrl+0" = "change_font_size all 0"; + }; + }; +} diff --git a/home/modules/theme.nix b/home/modules/theme.nix new file mode 100644 index 0000000..e65b9f6 --- /dev/null +++ b/home/modules/theme.nix @@ -0,0 +1,38 @@ +{ lib, ... }: + +{ + options.theme.colors = lib.mkOption { + type = lib.types.attrsOf lib.types.str; + description = "Named color palette"; + default = { + # Gruvbox Dark Medium + bg = "#282828"; + bg0_h = "#1d2021"; + bg0_s = "#32302f"; + bg1 = "#3c3836"; + bg2 = "#504945"; + bg3 = "#665c54"; + bg4 = "#7c6f64"; + fg = "#ebdbb2"; + fg1 = "#ebdbb2"; + fg2 = "#d5c4a1"; + fg3 = "#bdae93"; + fg4 = "#a89984"; + red = "#cc241d"; + red_b = "#fb4934"; + green = "#98971a"; + green_b = "#b8bb26"; + yellow = "#d79921"; + yellow_b = "#fabd2f"; + blue = "#458588"; + blue_b = "#83a598"; + purple = "#b16286"; + purple_b = "#d3869b"; + aqua = "#689d6a"; + aqua_b = "#8ec07c"; + orange = "#d65d0e"; + orange_b = "#fe8019"; + gray = "#928374"; + }; + }; +} diff --git a/home/modules/zsh.nix b/home/modules/zsh.nix new file mode 100644 index 0000000..bb138ef --- /dev/null +++ b/home/modules/zsh.nix @@ -0,0 +1,33 @@ +{ config, pkgs, ... }: + +let + c = config.theme.colors; +in +{ + programs.zsh = { + enable = true; + + enableCompletion = true; + autosuggestion.enable = true; + syntaxHighlighting.enable = true; + + history = { + size = 50000; + save = 50000; + ignoreDups = true; + share = true; + }; + + # new + initContent = '' + PROMPT="%F{${c.green_b}}%n@%m%f %F{${c.yellow_b}}%~%f %F{${c.fg4}}»%f " + ''; + + shellAliases = { + ls = "eza --icons"; + ll = "eza -la --icons"; + cat = "bat"; + grep = "rg"; + }; + }; +} diff --git a/home/profiles/desktop.nix b/home/profiles/desktop.nix new file mode 100644 index 0000000..83efc94 --- /dev/null +++ b/home/profiles/desktop.nix @@ -0,0 +1,7 @@ +{ pkgs, ... }: + +{ + home.packages = with pkgs; [ + obs-studio + ]; +} diff --git a/home/profiles/notebook.nix b/home/profiles/notebook.nix new file mode 100644 index 0000000..1fb98d0 --- /dev/null +++ b/home/profiles/notebook.nix @@ -0,0 +1,8 @@ +{ pkgs, ... }: + +{ + home.packages = with pkgs; [ + powertop + acpi + ]; +} diff --git a/home/profiles/server.nix b/home/profiles/server.nix new file mode 100644 index 0000000..103a3ba --- /dev/null +++ b/home/profiles/server.nix @@ -0,0 +1,8 @@ +{ pkgs, ... }: + +{ + # Minimal — no GUI packages + home.packages = with pkgs; [ + neovim + ]; +} diff --git a/result b/result new file mode 120000 index 0000000..4041b30 --- /dev/null +++ b/result @@ -0,0 +1 @@ +/nix/store/n49kz1y416s4a4qvivxskwr65pxyvh6y-home-manager-generation \ No newline at end of file