Adding networking

This commit is contained in:
2026-03-14 12:29:41 +01:00
parent 8df20fcd79
commit 1274d0e1f0
68 changed files with 556 additions and 1262 deletions
@@ -1,4 +1,4 @@
{ config, pkgs, lib, user, ... }:
{ config, pkgs, lib, user, flakeRoot, ... }:
let
kittyConfigDir = "${config.home-manager.users.${user.username}.xdg.configHome}/kitty";
in
@@ -6,54 +6,14 @@ in
home-manager.users.${user.username} = {
programs.kitty = {
enable = true;
settings = {
font_family = "JetBrainsMono Nerd Font";
font_size = 12.0;
cursor = "Beam";
cursor_blink_interval = -1;
shell = "${pkgs.zsh}/bin/zsh";
};
};
# Catppuccin Mocha theme for Kitty (embedded)
# Copy the actual kitty.conf (not a symlink)
xdg.configFile."kitty/kitty.conf".text = lib.concatStringsSep "\n" [
"# Catppuccin Mocha theme"
"background #1e1e2e"
"foreground #cdd6f4"
"selection_background #f5e0dc"
"selection_foreground #1e1e2e"
"url_color #f5e0dc"
"cursor #f5e0dc"
"cursor_text_color #1e1e2e"
"color0 #45475a"
"color8 #585b70"
"color1 #f38ba8"
"color9 #f38ba8"
"color2 #a6e3a1"
"color10 #a6e3a1"
"color3 #f9e2af"
"color11 #f9e2af"
"color4 #89b4fa"
"color12 #89b4fa"
"color5 #f5c2e7"
"color13 #f5c2e7"
"color6 #94e2d5"
"color14 #94e2d5"
"color7 #bac2de"
"color15 #bac2de"
"# Window settings"
"background_opacity 0.9"
"font_size 12.0"
"cursor_shape Beam"
(builtins.readFile "${flakeRoot}/assets/system/conf/kitty/kitty.conf")
];
# Copy the theme file
xdg.configFile."kitty/Catppuccin-Mocha.conf".source = "${flakeRoot}/assets/system/conf/kitty/Catppuccin-Mocha.conf";
};
}
@@ -1,27 +1,16 @@
{ config, pkgs, lib, user, ... }:
{
home-manager.users.${user.username} = {
programs.starship = {
enable = true;
};
# Catppuccin Mocha theme for Starship
xdg.configFile."starship.toml".text = ''
format = "$all"
[character]
success_symbol = "[](bold green)"
error_symbol = "[](bold red)"
[directory]
style = "bold lavender"
[git_branch]
symbol = " "
style = "bold maroon"
[package]
disabled = true
'';
lib,
config,
pkgs,
flakeRoot,
...
}:
let
starshipConfig = lib.importTOML (flakeRoot + "/assets/system/conf/starship.toml");
in
{
programs.starship = {
enable = true;
settings = starshipConfig;
};
}
@@ -1,61 +1,95 @@
{ config, pkgs, lib, user, ... }:
let
zshConfigDir = "${config.home-manager.users.${user.username}.xdg.configHome}/zsh";
in
{
home-manager.users.${user.username} = {
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;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
# Enable oh-my-zsh and use its plugins
oh-my-zsh = {
enable = true;
theme = "agnoster";
plugins = [
"git"
"docker"
"direnv"
"zsh-autosuggestions"
"zsh-syntax-highlighting"
"docker"
"kubectl"
"history"
"command-not-found"
"extract"
"zsh-completions"
"zsh-history-substring-search"
];
theme = "agnoster"; # Fallback, overridden below
};
shellAliases = {
ls = "exa --icons -a --group-directories-first";
ll = "exa --icons -la --group-directories-first";
};
# 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"
'';
};
# Consolidated .zshrc
xdg.configFile."zsh/.zshrc".text = lib.concatStringsSep "\n" [
"# Oh-My-Zsh"
"export ZSH=\"${zshConfigDir}\""
"source \"${pkgs.zsh}/share/zsh/functions/Newuser/zsh-newuser-install\""
"source \"${zshConfigDir}/oh-my-zsh.sh\""
""
"# Zsh options"
"setopt AUTO_CD"
"setopt CORRECT"
"setopt INTERACTIVE_COMMENTS"
""
"# Starship"
"eval \"$(starship init zsh)\""
""
"# fzf"
"source \"${pkgs.fzf}/shell/key-bindings.zsh\""
"source \"${pkgs.fzf}/shell/completion.zsh\""
""
"# User customizations"
"source \"${zshConfigDir}/custom.zsh\" 2>/dev/null"
# Home Manager packages (optional)
home.packages = with pkgs; [
direnv
git-extras
];
# User customizations
xdg.configFile."zsh/custom.zsh".text = ''
export EDITOR="nvim"
export PATH="$HOME/.local/bin:$PATH"
'';
};
}
@@ -1,6 +1,8 @@
{ config, pkgs, lib, user, inputs, flakeRoot,... }:
{
imports = [
./packages.nix
./flatpaks.nix
./accessibility/top.nix
./file_management/top.nix
./gaming/top.nix
@@ -8,5 +10,5 @@
./office_productivity/top.nix
./terminal_shell/top.nix
];
# .. put any code here
nixpkgs.config.allowUnfree = true;
}