Complete NixOS rewrite: Transform Omarchy from Arch to declarative NixOS

- Replace shell script-based Arch installation with declarative NixOS configuration
- Implement flake-based architecture for reproducible builds
- Add modular system with feature flags (Docker, gaming, development, etc.)
- Create declarative theme system with Tokyo Night and Catppuccin
- Convert utility scripts to Nix packages with proper derivations
- Add comprehensive development environments (Rust, Go, Python, Node.js, C/C++)
- Implement Home Manager integration for user environment management
- Add interactive installer with theme selection and feature configuration
- Update documentation for NixOS-specific workflows and commands
- Provide atomic updates with rollback capability

This maintains all aesthetic and functional benefits of original Omarchy
while gaining NixOS power: reproducibility, version control, and atomic updates.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
theArctesian
2025-09-24 13:59:37 -07:00
parent 2df8c5f7e0
commit aa9c8b4ac4
673 changed files with 4761 additions and 11886 deletions

View File

@@ -0,0 +1,198 @@
{ config, pkgs, lib, ... }:
{
# Catppuccin Mocha theme configuration
config = {
# Color palette
environment.variables = {
OMARCHY_THEME = "catppuccin";
OMARCHY_THEME_BG = "#1e1e2e";
OMARCHY_THEME_FG = "#cdd6f4";
OMARCHY_THEME_ACCENT = "#cba6f7";
};
# Home-manager theme configuration
home-manager.users.${config.omarchy.user or "user"} = {
# Alacritty theme
programs.alacritty.settings.colors = {
primary = {
background = "#1e1e2e";
foreground = "#cdd6f4";
dim_foreground = "#a6adc8";
bright_foreground = "#cdd6f4";
};
cursor = {
text = "#1e1e2e";
cursor = "#f5e0dc";
};
vi_mode_cursor = {
text = "#1e1e2e";
cursor = "#b4befe";
};
search = {
matches = {
foreground = "#1e1e2e";
background = "#a6adc8";
};
focused_match = {
foreground = "#1e1e2e";
background = "#a6e3a1";
};
};
hints = {
start = {
foreground = "#1e1e2e";
background = "#f9e2af";
};
end = {
foreground = "#1e1e2e";
background = "#a6adc8";
};
};
selection = {
text = "#1e1e2e";
background = "#f5e0dc";
};
normal = {
black = "#45475a";
red = "#f38ba8";
green = "#a6e3a1";
yellow = "#f9e2af";
blue = "#89b4fa";
magenta = "#f5c2e7";
cyan = "#94e2d5";
white = "#bac2de";
};
bright = {
black = "#585b70";
red = "#f38ba8";
green = "#a6e3a1";
yellow = "#f9e2af";
blue = "#89b4fa";
magenta = "#f5c2e7";
cyan = "#94e2d5";
white = "#a6adc8";
};
dim = {
black = "#45475a";
red = "#f38ba8";
green = "#a6e3a1";
yellow = "#f9e2af";
blue = "#89b4fa";
magenta = "#f5c2e7";
cyan = "#94e2d5";
white = "#bac2de";
};
};
# GTK theme
gtk = {
theme = {
name = "Catppuccin-Mocha-Standard-Lavender-Dark";
package = pkgs.catppuccin-gtk.override {
accents = ["lavender"];
size = "standard";
variant = "mocha";
};
};
iconTheme = {
name = "Papirus-Dark";
package = pkgs.catppuccin-papirus-folders.override {
flavor = "mocha";
accent = "lavender";
};
};
};
# Starship theme
programs.starship.settings = {
palette = "catppuccin_mocha";
palettes.catppuccin_mocha = {
rosewater = "#f5e0dc";
flamingo = "#f2cdcd";
pink = "#f5c2e7";
mauve = "#cba6f7";
red = "#f38ba8";
maroon = "#eba0ac";
peach = "#fab387";
yellow = "#f9e2af";
green = "#a6e3a1";
teal = "#94e2d5";
sky = "#89dceb";
sapphire = "#74c7ec";
blue = "#89b4fa";
lavender = "#b4befe";
text = "#cdd6f4";
subtext1 = "#bac2de";
subtext0 = "#a6adc8";
overlay2 = "#9399b2";
overlay1 = "#7f849c";
overlay0 = "#6c7086";
surface2 = "#585b70";
surface1 = "#45475a";
surface0 = "#313244";
base = "#1e1e2e";
mantle = "#181825";
crust = "#11111b";
};
format = ''
[](surface2)$username[@](yellow)$hostname [in ](text)$directory$git_branch$git_status$cmd_duration
[](surface2)$character
'';
character = {
success_symbol = "[](green)";
error_symbol = "[](red)";
};
directory = {
style = "blue";
};
git_branch = {
style = "mauve";
symbol = " ";
};
git_status = {
style = "red";
};
};
# Mako notification theme
services.mako = {
backgroundColor = "#1e1e2e";
textColor = "#cdd6f4";
borderColor = "#cba6f7";
progressColor = "#cba6f7";
defaultTimeout = 5000;
borderRadius = 10;
borderSize = 2;
font = "JetBrainsMono Nerd Font 10";
padding = "10";
margin = "20";
};
};
# Hyprland theme colors
environment.systemPackages = with pkgs; [
(writeShellScriptBin "set-catppuccin-colors" ''
#!/usr/bin/env bash
# Set Catppuccin Mocha colors in Hyprland
hyprctl keyword general:col.active_border "rgba(cba6f7ee) rgba(89b4faee) 45deg"
hyprctl keyword general:col.inactive_border "rgba(585b70aa)"
hyprctl keyword decoration:col.shadow "rgba(1e1e2eee)"
'')
];
};
}

View File

@@ -0,0 +1,257 @@
{ config, pkgs, lib, ... }:
{
# Tokyo Night theme configuration
config = {
# Color palette
environment.variables = {
OMARCHY_THEME = "tokyo-night";
OMARCHY_THEME_BG = "#1a1b26";
OMARCHY_THEME_FG = "#c0caf5";
OMARCHY_THEME_ACCENT = "#7aa2f7";
};
# Home-manager theme configuration
home-manager.users.${config.omarchy.user or "user"} = {
# Alacritty theme
programs.alacritty.settings.colors = {
primary = {
background = "#1a1b26";
foreground = "#c0caf5";
};
normal = {
black = "#15161e";
red = "#f7768e";
green = "#9ece6a";
yellow = "#e0af68";
blue = "#7aa2f7";
magenta = "#bb9af7";
cyan = "#7dcfff";
white = "#a9b1d6";
};
bright = {
black = "#414868";
red = "#f7768e";
green = "#9ece6a";
yellow = "#e0af68";
blue = "#7aa2f7";
magenta = "#bb9af7";
cyan = "#7dcfff";
white = "#c0caf5";
};
indexed_colors = [
{ index = 16; color = "#ff9e64"; }
{ index = 17; color = "#db4b4b"; }
];
};
# Kitty theme
programs.kitty = {
theme = "Tokyo Night";
settings = {
background = "#1a1b26";
foreground = "#c0caf5";
selection_background = "#33467c";
selection_foreground = "#c0caf5";
cursor = "#c0caf5";
cursor_text_color = "#1a1b26";
# Black
color0 = "#15161e";
color8 = "#414868";
# Red
color1 = "#f7768e";
color9 = "#f7768e";
# Green
color2 = "#9ece6a";
color10 = "#9ece6a";
# Yellow
color3 = "#e0af68";
color11 = "#e0af68";
# Blue
color4 = "#7aa2f7";
color12 = "#7aa2f7";
# Magenta
color5 = "#bb9af7";
color13 = "#bb9af7";
# Cyan
color6 = "#7dcfff";
color14 = "#7dcfff";
# White
color7 = "#a9b1d6";
color15 = "#c0caf5";
};
};
# VS Code theme
programs.vscode.userSettings = {
"workbench.colorTheme" = "Tokyo Night";
"editor.tokenColorCustomizations" = {
"[Tokyo Night]" = {
"textMateRules" = [];
};
};
"workbench.colorCustomizations" = {
"[Tokyo Night]" = {
"editor.background" = "#1a1b26";
"editor.foreground" = "#c0caf5";
"sideBar.background" = "#16161e";
"sideBar.foreground" = "#a9b1d6";
"activityBar.background" = "#16161e";
"activityBar.foreground" = "#c0caf5";
};
};
};
# GTK theme
gtk = {
theme = {
name = "Tokyo-Night";
package = pkgs.tokyo-night-gtk or (pkgs.adw-gtk3.overrideAttrs (oldAttrs: {
pname = "tokyo-night-gtk";
postInstall = (oldAttrs.postInstall or "") + ''
# Customize colors for Tokyo Night
sed -i 's/#1e1e2e/#1a1b26/g' $out/share/themes/*/gtk-3.0/gtk.css
sed -i 's/#cdd6f4/#c0caf5/g' $out/share/themes/*/gtk-3.0/gtk.css
'';
}));
};
};
# Rofi/Wofi theme
programs.rofi = {
theme = let
inherit (config.lib.formats.rasi) mkLiteral;
in {
"*" = {
background = mkLiteral "#1a1b26";
foreground = mkLiteral "#c0caf5";
selected = mkLiteral "#33467c";
active = mkLiteral "#7aa2f7";
urgent = mkLiteral "#f7768e";
};
};
};
# Starship theme adjustments
programs.starship.settings = {
palette = "tokyo-night";
palettes.tokyo-night = {
bg = "#1a1b26";
fg = "#c0caf5";
black = "#15161e";
red = "#f7768e";
green = "#9ece6a";
yellow = "#e0af68";
blue = "#7aa2f7";
magenta = "#bb9af7";
cyan = "#7dcfff";
white = "#a9b1d6";
};
character = {
success_symbol = "[](green)";
error_symbol = "[](red)";
};
directory = {
style = "blue";
truncation_length = 3;
};
git_branch = {
style = "magenta";
symbol = " ";
};
git_status = {
style = "red";
};
};
# Neovim theme
programs.neovim.plugins = with pkgs.vimPlugins; [
{
plugin = tokyonight-nvim;
type = "lua";
config = ''
vim.cmd[[colorscheme tokyonight-night]]
'';
}
];
# Bat theme
programs.bat.config.theme = "TwoDark"; # Close to Tokyo Night
# btop theme
programs.btop.settings.color_theme = "tokyo-night";
# Lazygit theme
programs.lazygit.settings = {
gui.theme = {
activeBorderColor = [ "#7aa2f7" "bold" ];
inactiveBorderColor = [ "#414868" ];
selectedLineBgColor = [ "#33467c" ];
selectedRangeBgColor = [ "#33467c" ];
cherryPickedCommitBgColor = [ "#33467c" ];
cherryPickedCommitFgColor = [ "#7aa2f7" ];
unstagedChangesColor = [ "#f7768e" ];
defaultFgColor = [ "#c0caf5" ];
};
};
# Firefox theme
programs.firefox.profiles.default = {
userChrome = ''
/* Tokyo Night theme for Firefox */
:root {
--toolbar-bgcolor: #1a1b26 !important;
--toolbar-color: #c0caf5 !important;
--toolbarbutton-hover-background: #33467c !important;
--toolbarbutton-active-background: #414868 !important;
--urlbar-focused-bg-color: #1a1b26 !important;
--urlbar-focused-color: #c0caf5 !important;
--tab-selected-bgcolor: #33467c !important;
--tab-selected-color: #c0caf5 !important;
}
'';
};
# Mako notification theme
services.mako = {
backgroundColor = "#1a1b26";
textColor = "#c0caf5";
borderColor = "#7aa2f7";
progressColor = "#7aa2f7";
defaultTimeout = 5000;
borderRadius = 10;
borderSize = 2;
font = "JetBrainsMono Nerd Font 10";
padding = "10";
margin = "20";
};
};
# Wallpaper
environment.systemPackages = with pkgs; [
(writeShellScriptBin "set-wallpaper" ''
#!/usr/bin/env bash
# Set Tokyo Night themed wallpaper
swww img ${./wallpapers/tokyo-night.jpg} --transition-type wipe --transition-angle 30 --transition-step 90
'')
];
};
}