New structure since I kept struggling with the home-manager implemnentation

This commit is contained in:
2026-03-18 15:05:33 +00:00
parent 86c3f52851
commit 084cd4c0f1
86 changed files with 507 additions and 4509 deletions
@@ -0,0 +1,12 @@
{ config, pkgs, lib, user, flakeRoot, ... }:
let
kittyConf = "${flakeRoot}/assets/system/conf/kitty/kitty.conf";
kittyTheme = "${flakeRoot}/assets/system/conf/kitty/Catppuccin-Mocha.conf";
in
{
home-manager.users.${user.username} = {
programs.kitty.enable = true;
xdg.configFile."kitty/kitty.conf".source = kittyConf;
xdg.configFile."kitty/Catppuccin-Mocha.conf".source = kittyTheme;
};
}
@@ -0,0 +1,16 @@
{
lib,
config,
pkgs,
flakeRoot,
...
}:
let
starshipConfig = lib.importTOML (flakeRoot + "/assets/system/conf/starship.toml");
in
{
programs.starship = {
enable = true;
settings = starshipConfig;
};
}
@@ -0,0 +1,90 @@
{
lib,
config,
pkgs,
...
}:
{
# --- NixOS Configuration ---
environment.systemPackages = with pkgs; [
zsh
git
docker
];
# --- Home Manager Configuration ---
home-manager.users.henrov = {
programs.zsh = {
enable = true;
enableCompletion = true;
# Enable oh-my-zsh and use its plugins
oh-my-zsh = {
enable = true;
plugins = [
"git"
"docker"
"direnv"
"zsh-autosuggestions"
"zsh-syntax-highlighting"
"zsh-completions"
"zsh-history-substring-search"
];
theme = "agnoster"; # Fallback, overridden below
};
# Source Nixpkgs-provided plugins explicitly
initContent = ''
# Source plugins installed by Nix
source ${pkgs.zsh-autosuggestions}/share/zsh-autosuggestions/zsh-autosuggestions.zsh
source ${pkgs.zsh-syntax-highlighting}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source ${pkgs.zsh-history-substring-search}/share/zsh-history-substring-search/zsh-history-substring-search.zsh
# Catppuccin Mocha theme for oh-my-zsh
local mocha_base="#1E1E2E"
local mocha_surface0="#313244"
local mocha_text="#CDD6F4"
local mocha_lavender="#B4BEFE"
local mocha_blue="#89B4FA"
local mocha_sapphire="#74C7EC"
local mocha_teal="#94E2D5"
local mocha_green="#A6E3A1"
local mocha_yellow="#F9E2AF"
local mocha_peach="#FAB387"
local mocha_maroon="#EBA0AC"
local mocha_red="#F38BA8"
local mocha_mauve="#CBA6F7"
local mocha_pink="#F5C2E7"
local mocha_flamingo="#F2CDCD"
local mocha_rosewater="#F5E0DC"
# Prompt
PROMPT='%{$fg[$mocha_blue]%}%n%{$reset_color%}@%{$fg[$mocha_peach]%}%m%{$reset_color%} %{$fg[$mocha_lavender]%}%~%{$reset_color%} %{$fg[$mocha_red]%}$%{$reset_color%} '
RPROMPT='%{$fg[$mocha_green]%}%T%{$reset_color%}'
# Git prompt
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[$mocha_yellow]%}(%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$fg[$mocha_yellow]%})%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[$mocha_red]%}%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[$mocha_green]%}%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_AHEAD="%{$fg[$mocha_blue]%}%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_BEHIND="%{$fg[$mocha_blue]%}%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[$mocha_pink]%}?%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_STAGED="%{$fg[$mocha_sapphire]%}+%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_UNSTAGED="%{$fg[$mocha_red]%}!%{$reset_color%}"
# Virtualenv/pyenv
ZSH_THEME_VIRTUAL_ENV_PREFIX="(%{$fg[$mocha_teal]%}"
ZSH_THEME_VIRTUAL_ENV_SUFFIX="%{$reset_color%})"
# Right prompt with Git status
RPROMPT='$(git_prompt_info) %{$fg[$mocha_green]%}%T%{$reset_color%}'
# Set the custom theme
ZSH_THEME="catppuccin-mocha"
'';
};
};
}