From 1b5bcae686240c58b24a1a5c6db6eaabd29fe131 Mon Sep 17 00:00:00 2001 From: m3tm3re Date: Sun, 26 Apr 2026 10:37:03 +0200 Subject: [PATCH 01/13] feat: create new home/ directory structure for profile-based config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit New structure: - home/base/ - Always loaded (shell, cli-tools, secrets) - home/coding/ - Profile-independent dev tooling (editor, lsp, git, agents) - home/profiles/ - Freely combinable profiles (gaming, media) - home/desktop/ - Desktop-only (wm, apps, theme) - home/server/ - Minimal server stub Migration sources: - home/features/cli/ → home/base/{shell,cli-tools,secrets} - home/features/desktop/hyprland,wayland,rofi → home/desktop/wm/ - home/features/desktop/obsidian,office,webapps,crypto → home/desktop/apps/ - home/features/desktop/fonts,theme,wallpapers → home/desktop/theme/ - gaming.nix split → home/profiles/gaming/{steam,gamescope} - media.nix split → home/profiles/media/{obs,ffmpeg,yt-dlp,kdenlive,handbrake} Option namespaces updated: - features.cli.* → base.shell.* / base.cliTools.* / base.secrets - features.desktop.* → desktop.wm.* / desktop.apps.* / desktop.theme.* - features.desktop.gaming → profiles.gaming.* - features.desktop.media → profiles.media.* Verified: nix flake check passes (warnings only) --- home/base/cli-tools/default.nix | 9 + home/base/cli-tools/fzf.nix | 41 ++++ home/base/cli-tools/nitch.nix | 16 ++ home/base/cli-tools/television.nix | 59 ++++++ home/base/cli-tools/zellij.nix | 33 +++ home/base/default.nix | 9 + home/base/secrets/secrets.nix | 23 +++ home/base/shell/default.nix | 7 + home/base/shell/nushell.nix | 85 ++++++++ home/base/shell/starship.nix | 69 +++++++ home/coding/agents/agents.nix | 103 ++++++++++ home/coding/default.nix | 10 + home/coding/editor/default.nix | 6 + home/coding/editor/neovim.nix | 17 ++ home/coding/git/git.nix | 41 ++++ home/coding/lsp/default.nix | 6 + home/coding/lsp/servers.nix | 22 ++ home/desktop/apps/crypto.nix | 16 ++ home/desktop/apps/default.nix | 9 + home/desktop/apps/obsidian.nix | 25 +++ home/desktop/apps/office.nix | 16 ++ home/desktop/apps/webapps.nix | 56 +++++ home/desktop/default.nix | 125 ++++++++++++ home/desktop/theme/default.nix | 8 + home/desktop/theme/fonts.nix | 24 +++ home/desktop/theme/theme.nix | 24 +++ home/desktop/theme/wallpapers.nix | 19 ++ home/desktop/wm/default.nix | 8 + home/desktop/wm/hyprland.nix | 318 +++++++++++++++++++++++++++++ home/desktop/wm/rofi.nix | 207 +++++++++++++++++++ home/desktop/wm/wayland.nix | 30 +++ home/profiles/gaming/default.nix | 7 + home/profiles/gaming/gamescope.nix | 16 ++ home/profiles/gaming/steam.nix | 21 ++ home/profiles/media/default.nix | 10 + home/profiles/media/ffmpeg.nix | 24 +++ home/profiles/media/handbrake.nix | 21 ++ home/profiles/media/kdenlive.nix | 16 ++ home/profiles/media/obs.nix | 21 ++ home/profiles/media/yt-dlp.nix | 31 +++ home/server/default.nix | 6 + 41 files changed, 1614 insertions(+) create mode 100644 home/base/cli-tools/default.nix create mode 100644 home/base/cli-tools/fzf.nix create mode 100644 home/base/cli-tools/nitch.nix create mode 100644 home/base/cli-tools/television.nix create mode 100644 home/base/cli-tools/zellij.nix create mode 100644 home/base/default.nix create mode 100644 home/base/secrets/secrets.nix create mode 100644 home/base/shell/default.nix create mode 100644 home/base/shell/nushell.nix create mode 100644 home/base/shell/starship.nix create mode 100644 home/coding/agents/agents.nix create mode 100644 home/coding/default.nix create mode 100644 home/coding/editor/default.nix create mode 100644 home/coding/editor/neovim.nix create mode 100644 home/coding/git/git.nix create mode 100644 home/coding/lsp/default.nix create mode 100644 home/coding/lsp/servers.nix create mode 100644 home/desktop/apps/crypto.nix create mode 100644 home/desktop/apps/default.nix create mode 100644 home/desktop/apps/obsidian.nix create mode 100644 home/desktop/apps/office.nix create mode 100644 home/desktop/apps/webapps.nix create mode 100644 home/desktop/default.nix create mode 100644 home/desktop/theme/default.nix create mode 100644 home/desktop/theme/fonts.nix create mode 100644 home/desktop/theme/theme.nix create mode 100644 home/desktop/theme/wallpapers.nix create mode 100644 home/desktop/wm/default.nix create mode 100644 home/desktop/wm/hyprland.nix create mode 100644 home/desktop/wm/rofi.nix create mode 100644 home/desktop/wm/wayland.nix create mode 100644 home/profiles/gaming/default.nix create mode 100644 home/profiles/gaming/gamescope.nix create mode 100644 home/profiles/gaming/steam.nix create mode 100644 home/profiles/media/default.nix create mode 100644 home/profiles/media/ffmpeg.nix create mode 100644 home/profiles/media/handbrake.nix create mode 100644 home/profiles/media/kdenlive.nix create mode 100644 home/profiles/media/obs.nix create mode 100644 home/profiles/media/yt-dlp.nix create mode 100644 home/server/default.nix diff --git a/home/base/cli-tools/default.nix b/home/base/cli-tools/default.nix new file mode 100644 index 0000000..0a4dd8f --- /dev/null +++ b/home/base/cli-tools/default.nix @@ -0,0 +1,9 @@ +# CLI tools aggregator — imports all base command-line utilities. +{...}: { + imports = [ + ./fzf.nix + ./nitch.nix + ./television.nix + ./zellij.nix + ]; +} diff --git a/home/base/cli-tools/fzf.nix b/home/base/cli-tools/fzf.nix new file mode 100644 index 0000000..8939199 --- /dev/null +++ b/home/base/cli-tools/fzf.nix @@ -0,0 +1,41 @@ +# Fuzzy finder with nix-colors palette and Wayland clipboard integration. +{ + config, + lib, + ... +}: +with lib; let + cfg = config.base.cliTools.fzf; +in { + options.base.cliTools.fzf.enable = mkEnableOption "enable fuzzy finder"; + + config = mkIf cfg.enable { + programs.fzf = { + enable = true; + enableFishIntegration = true; + colors = { + "fg" = "#${config.colorScheme.palette.base05}"; + "bg" = "#${config.colorScheme.palette.base00}"; + "hl" = "#${config.colorScheme.palette.base0E}"; + "fg+" = "#${config.colorScheme.palette.base05}"; + "bg+" = "#${config.colorScheme.palette.base02}"; + "hl+" = "#${config.colorScheme.palette.base0E}"; + "info" = "#${config.colorScheme.palette.base09}"; + "prompt" = "#${config.colorScheme.palette.base0B}"; + "pointer" = "#${config.colorScheme.palette.base08}"; + "marker" = "#${config.colorScheme.palette.base08}"; + "spinner" = "#${config.colorScheme.palette.base09}"; + "header" = "#${config.colorScheme.palette.base03}"; + }; + defaultOptions = [ + "--preview='bat --color=always -n {}'" + "--bind 'ctrl-/:toggle-preview'" + "--header 'Press CTRL-Y to copy command into clipboard'" + "--bind 'ctrl-/:toggle-preview'" + "--bind 'ctrl-y:execute-silent(echo -n {2..} | wl-copy)+abort'" + ]; + defaultCommand = "fd --type f --exclude .git --follow --hidden"; + changeDirWidgetCommand = "fd --type d --exclude .git --follow --hidden"; + }; + }; +} diff --git a/home/base/cli-tools/nitch.nix b/home/base/cli-tools/nitch.nix new file mode 100644 index 0000000..dc2147d --- /dev/null +++ b/home/base/cli-tools/nitch.nix @@ -0,0 +1,16 @@ +# Nitch — minimal system information display tool. +{ + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.base.cliTools.nitch; +in { + options.base.cliTools.nitch.enable = mkEnableOption "enable nitch"; + + config = mkIf cfg.enable { + home.packages = [pkgs.nitch]; + }; +} diff --git a/home/base/cli-tools/television.nix b/home/base/cli-tools/television.nix new file mode 100644 index 0000000..3c6aa67 --- /dev/null +++ b/home/base/cli-tools/television.nix @@ -0,0 +1,59 @@ +# Television — fuzzy finder with custom channels for tldr, git-diff, and git-log. +{ + config, + lib, + ... +}: +with lib; let + cfg = config.base.cliTools.television; +in { + options.base.cliTools.television.enable = mkEnableOption "enable television"; + + config = mkIf cfg.enable { + programs.television = { + enable = true; + channels = { + tldr = { + metadata = { + description = "Browse TLDR pages"; + name = "tldr"; + requirements = ["tldr"]; + }; + preview = { + command = "tldr '{}'"; + }; + source = { + command = "tldr --list"; + }; + }; + git-diff = { + metadata = { + description = "A channel to select files from git diff commands"; + name = "git-diff"; + requirements = ["git"]; + }; + preview = { + command = "git diff HEAD --color=always -- '{}'"; + }; + source = { + command = "git diff --name-only HEAD"; + }; + }; + git-log = { + metadata = { + description = "A channel to select from git log entries"; + name = "git-log"; + requirements = ["git"]; + }; + preview = { + command = "git show -p --stat --pretty=fuller --color=always '{0}'"; + }; + source = { + command = "git log --oneline --date=short --pretty=\"format:%h %s %an %cd\" \"$@\""; + output = "{split: :0}"; + }; + }; + }; + }; + }; +} diff --git a/home/base/cli-tools/zellij.nix b/home/base/cli-tools/zellij.nix new file mode 100644 index 0000000..38e5c40 --- /dev/null +++ b/home/base/cli-tools/zellij.nix @@ -0,0 +1,33 @@ +# Zellij terminal multiplexer with nix-colors theming. +{ + config, + lib, + ... +}: +with lib; let + cfg = config.base.cliTools.zellij; +in { + options.base.cliTools.zellij.enable = mkEnableOption "enable zellij multiplexer"; + + config = mkIf cfg.enable { + programs.zellij = { + enable = true; + settings = { + theme = "universal"; + themes.universal = { + bg = "#${config.colorScheme.palette.base00}"; + fg = "#${config.colorScheme.palette.base05}"; + black = "#${config.colorScheme.palette.base01}"; + red = "#${config.colorScheme.palette.base08}"; + green = "#${config.colorScheme.palette.base0B}"; + yellow = "#${config.colorScheme.palette.base0A}"; + blue = "#${config.colorScheme.palette.base0D}"; + magenta = "#${config.colorScheme.palette.base0E}"; + cyan = "#${config.colorScheme.palette.base0C}"; + white = "#${config.colorScheme.palette.base07}"; + orange = "#${config.colorScheme.palette.base09}"; + }; + }; + }; + }; +} diff --git a/home/base/default.nix b/home/base/default.nix new file mode 100644 index 0000000..daa5afb --- /dev/null +++ b/home/base/default.nix @@ -0,0 +1,9 @@ +# Base home-manager configuration — always loaded on every host. +# Includes shell, CLI tools, and secrets modules. +{...}: { + imports = [ + ./shell + ./cli-tools + ./secrets/secrets.nix + ]; +} diff --git a/home/base/secrets/secrets.nix b/home/base/secrets/secrets.nix new file mode 100644 index 0000000..7a72827 --- /dev/null +++ b/home/base/secrets/secrets.nix @@ -0,0 +1,23 @@ +# Password store and secrets management via pass-wayland with OTP and import extensions. +{ + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.base.secrets; +in { + options.base.secrets.enable = mkEnableOption "enable secrets management"; + + config = mkIf cfg.enable { + programs.password-store = { + enable = true; + package = + pkgs.pass-wayland.withExtensions + (exts: [exts.pass-otp exts.pass-import]); + settings = {PASSWORD_STORE_DIR = "$XDG_DATA_HOME/password-store";}; + }; + home.packages = [pkgs.pinentry-gnome3]; + }; +} diff --git a/home/base/shell/default.nix b/home/base/shell/default.nix new file mode 100644 index 0000000..b5b0c37 --- /dev/null +++ b/home/base/shell/default.nix @@ -0,0 +1,7 @@ +# Shell aggregator — imports Nushell (primary) and Starship prompt. +{...}: { + imports = [ + ./nushell.nix + ./starship.nix + ]; +} diff --git a/home/base/shell/nushell.nix b/home/base/shell/nushell.nix new file mode 100644 index 0000000..9616531 --- /dev/null +++ b/home/base/shell/nushell.nix @@ -0,0 +1,85 @@ +# Primary shell configuration — Nushell with environment, aliases, and integrations. +{ + config, + lib, + ... +}: +with lib; let + cfg = config.base.shell.nushell; +in { + options.base.shell.nushell.enable = mkEnableOption "enable nushell"; + + config = mkIf cfg.enable { + programs.nushell = { + enable = true; + envFile.text = '' + $env.config.show_banner = false + $env.NIX_PATH = "nixpkgs=channel:nixos-unstable" + $env.NIX_LOG = "iunfo" + $env.WEBKIT_DISABLE_COMPOSITING_MODE = "1" + $env.TERMINAL = "ghostty" + $env.EDITOR = "nvim" + $env.VISUAL = "zeditor" + $env.FZF_DEFAULT_COMMAND = "fd --type f --exclude .git --follow --hidden" + $env.FZF_DEFAULT_OPTS = "--preview='bat --color=always -n {}' --bind 'ctrl-/:toggle-preview' --header 'Press CTRL-Y to copy command into clipboard' --bind 'ctrl-/:toggle-preview' --bind 'ctrl-y:execute-silent(echo -n {2..} | wl-copy)+abort' --color bg:#282a36,bg+:#44475a,fg:#f8f8f2,fg+:#f8f8f2,header:#6272a4,hl:#bd93f9,hl+:#bd93f9,info:#ffb86c,marker:#ff79c6,pointer:#ff79c6,prompt:#50fa7b,spinner:#ffb86c" + $env.XDG_DATA_HOME = $"($env.HOME)/.local/share" + $env.SSH_AUTH_SOCK = "/run/user/1000/gnupg/S.gpg-agent.ssh" + $env.PATH = ($env.PATH | split row (char esep) | append $"($env.HOME)/.cache/.bun/bin" | append $"($env.HOME)/.npm-global/bin" | uniq) + $env.NPM_CONFIG_PREFIX = $"($env.HOME)/.npm-global" + $env.FLAKE = $"($env.HOME)/p/NIX/nixos-config" + + # Load kestractl-env from agenix + if ("/run/agenix/kestractl-env" | path exists) { + open /run/agenix/kestractl-env + | lines + | where {($in | str trim | str length) > 0} + | parse "{key}={value}" + | update value {str trim -c '"'} + | transpose -r -d + | load-env + } + ''; + + configFile.text = '' + # Aliases + alias .. = cd .. + alias ... = cd ... + alias h = cd $env.HOME + alias b = yazi + alias lt = eza --tree --level=2 --long --icons --git + alias grep = rg + alias just = just --unstable + + alias node = bun + alias npx = bunx + + alias n = nix + alias nd = nix develop -c $nu.current-shell + alias ns = nix shell + alias nsn = nix shell nixpkgs# + alias nb = nix build + alias nbn = nix build nixpkgs# + alias nf = nix flake + + alias nr = sudo nixos-rebuild --flake . + alias nrs = sudo nixos-rebuild switch --flake .#(sys host | get hostname) + alias snr = sudo nixos-rebuild --flake . + alias snrs = sudo nixos-rebuild --flake . switch + alias hm = home-manager --flake . + alias hms = home-manager --flake . switch + alias hmr = do { cd ~/projects/nix-configurations; nix flake lock --update-input dotfiles; home-manager --flake .#(whoami)@(hostname) switch } + + alias tsu = sudo tailscale up + alias tsd = sudo tailscale down + + alias vi = nvim + alias vim = nvim + + if (which tv | is-not-empty) { + mkdir ($nu.data-dir | path join "vendor/autoload") + tv init nu | save -f ($nu.data-dir | path join "vendor/autoload/tv.nu") + } + ''; + }; + }; +} diff --git a/home/base/shell/starship.nix b/home/base/shell/starship.nix new file mode 100644 index 0000000..3fb6c10 --- /dev/null +++ b/home/base/shell/starship.nix @@ -0,0 +1,69 @@ +# Starship cross-shell prompt with nix-colors theming. +{ + config, + lib, + ... +}: +with lib; let + cfg = config.base.shell.starship; +in { + options.base.shell.starship.enable = mkEnableOption "enable starship prompt"; + + config = mkIf cfg.enable { + programs.starship = { + enable = true; + enableFishIntegration = true; + enableNushellIntegration = true; + settings = { + format = "$all$character"; + palette = "universal"; + + palettes.universal = { + background = "#${config.colorScheme.palette.base00}"; + surface = "#${config.colorScheme.palette.base01}"; + muted = "#${config.colorScheme.palette.base03}"; + text = "#${config.colorScheme.palette.base05}"; + bright = "#${config.colorScheme.palette.base07}"; + accent1 = "#${config.colorScheme.palette.base08}"; + accent2 = "#${config.colorScheme.palette.base09}"; + accent3 = "#${config.colorScheme.palette.base0A}"; + accent4 = "#${config.colorScheme.palette.base0B}"; + accent5 = "#${config.colorScheme.palette.base0C}"; + accent6 = "#${config.colorScheme.palette.base0D}"; + accent7 = "#${config.colorScheme.palette.base0E}"; + }; + + character = { + success_symbol = "[❯](accent7)"; + error_symbol = "[❯](accent1)"; + }; + + directory = { + style = "accent6"; + truncation_length = 3; + truncate_to_repo = false; + }; + + git_branch = { + style = "accent7"; + }; + + git_status = { + style = "accent5"; + }; + + cmd_duration = { + style = "accent3"; + }; + + hostname = { + style = "accent4"; + }; + + username = { + style_user = "accent2"; + }; + }; + }; + }; +} diff --git a/home/coding/agents/agents.nix b/home/coding/agents/agents.nix new file mode 100644 index 0000000..ca014a7 --- /dev/null +++ b/home/coding/agents/agents.nix @@ -0,0 +1,103 @@ +# AI agent system — OpenCode, Pi, and MCP server configuration. +# References inputs.m3ta-nixpkgs.homeManagerModules.coding.agents for the base module. +{ + config, + inputs, + lib, + pkgs, + videoDrivers, + ... +}: +with lib; let + npmGlobalPrefix = "${config.home.homeDirectory}/.npm-global"; +in { + home.file.".npmrc".text = '' + prefix=${npmGlobalPrefix} + ''; + home.sessionVariables.NPM_CONFIG_PREFIX = npmGlobalPrefix; + + imports = [ + # OpenCode and Pi agent configurations + ../../features/coding/opencode.nix + ../../features/coding/pi.nix + ]; + + coding.agents.skills = { + agentsInput = inputs.agents; + externalSkills = [ + { + src = inputs.skills-anthropic; + selectSkills = ["pdf" "docx" "frontend-design"]; + } + {src = inputs.skills-vercel;} + {src = inputs.skills-basecamp;} + {src = inputs.skills-kestra;} + ]; + }; + + programs.mcp = { + enable = true; + servers = { + DeepWiki = { + url = "https://mcp.deepwiki.com/mcp"; + }; + Ref = { + command = "bash"; + args = ["-c" "REF_API_KEY=$(cat /run/agenix/ref-key) exec bunx ref-tools-mcp@latest"]; + }; + Exa = { + command = "bash"; + args = ["-c" "EXA_API_KEY=$(cat /run/agenix/exa-key) exec bunx exa-mcp-server@latest tools=web_search_exa"]; + }; + Outline = { + url = "https://wiki.az-gruppe.com/mcp"; + }; + ContextMode = { + command = "bash"; + args = ["-c" "exec bunx context-mode@latest"]; + }; + Honcho = { + command = "bash"; + args = [ + "-c" + ''exec bunx mcp-remote@latest https://mcp.honcho.dev --header "Authorization:Bearer $(cat /run/agenix/honcho-key)" --header "X-Honcho-User-Name:m3tam3re"'' + ]; + }; + }; + }; + + home.packages = with pkgs; [ + agenix-cli + agent-browser + alejandra + bc + bun + devpod + gnumake + cmake + (python3.withPackages (ps: + with ps; [ + pip + uv + numba + numpy + torch + srt + ])) + pyrefly + nixd + nix-update + nodejs + (qmd.override { + vulkanSupport = videoDrivers == ["amdgpu"]; + cudaSupport = videoDrivers == ["nvidia"]; + }) + openshell + openspec + pi-coding-agent + sidecar + tailwindcss + tailwindcss-language-server + td + ]; +} diff --git a/home/coding/default.nix b/home/coding/default.nix new file mode 100644 index 0000000..11c433c --- /dev/null +++ b/home/coding/default.nix @@ -0,0 +1,10 @@ +# Coding environment aggregator — profile-independent development tooling. +# Imports editors, LSP servers, git configuration, and the agent system. +{...}: { + imports = [ + ./editor + ./lsp + ./git/git.nix + ./agents/agents.nix + ]; +} diff --git a/home/coding/editor/default.nix b/home/coding/editor/default.nix new file mode 100644 index 0000000..6c02d36 --- /dev/null +++ b/home/coding/editor/default.nix @@ -0,0 +1,6 @@ +# Editor aggregator — delegates to m3ta-nixpkgs editors module for NeoVim and Zed. +{...}: { + imports = [ + ./neovim.nix + ]; +} diff --git a/home/coding/editor/neovim.nix b/home/coding/editor/neovim.nix new file mode 100644 index 0000000..9c555c4 --- /dev/null +++ b/home/coding/editor/neovim.nix @@ -0,0 +1,17 @@ +# NeoVim base configuration via m3ta-nixpkgs coding.editors module. +{ + config, + lib, + ... +}: +with lib; let + cfg = config.coding.editors.neovim; +in { + # coding.editors.neovim is provided by inputs.m3ta-nixpkgs.homeManagerModules.default + options.coding.editors.neovim.enable = mkEnableOption "enable NeoVim editor"; + + config = mkIf cfg.enable { + # NeoVim configuration is managed by the m3ta-nixpkgs coding.editors module. + # Additional host-specific overrides can be added here. + }; +} diff --git a/home/coding/git/git.nix b/home/coding/git/git.nix new file mode 100644 index 0000000..4d91287 --- /dev/null +++ b/home/coding/git/git.nix @@ -0,0 +1,41 @@ +# Git configuration with signing, aliases, and global ignore. +# Identity and host-specific SSH keys are set per-host in home/m3tam3re/. +{ + lib, + pkgs, + ... +}: +with lib; { + programs.git = { + enable = true; + signing.format = null; + settings = { + user = { + name = lib.mkDefault "m3tam3re"; + email = lib.mkDefault "p@m3ta.dev"; + }; + core.excludesfile = "~/.gitignore_global"; + init.defaultBranch = "master"; + alias = { + st = "status"; + logd = "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"; + }; + }; + }; + + programs.difftastic.enable = true; + + programs.jujutsu = { + enable = true; + settings = { + user = { + email = "m@m3tam3re.com"; + name = "Sascha Koenig"; + }; + }; + }; + + home.packages = with pkgs; [ + lazygit + ]; +} diff --git a/home/coding/lsp/default.nix b/home/coding/lsp/default.nix new file mode 100644 index 0000000..c8e11b0 --- /dev/null +++ b/home/coding/lsp/default.nix @@ -0,0 +1,6 @@ +# LSP aggregator — language server protocol tooling. +{...}: { + imports = [ + ./servers.nix + ]; +} diff --git a/home/coding/lsp/servers.nix b/home/coding/lsp/servers.nix new file mode 100644 index 0000000..935855e --- /dev/null +++ b/home/coding/lsp/servers.nix @@ -0,0 +1,22 @@ +# LSP server configuration — language servers for the development environment. +{ + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.coding.lsp; +in { + options.coding.lsp.enable = mkEnableOption "enable LSP servers"; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ + # Nix + nixd + # General + nodePackages.typescript-language-server + tailwindcss-language-server + ]; + }; +} diff --git a/home/desktop/apps/crypto.nix b/home/desktop/apps/crypto.nix new file mode 100644 index 0000000..56b0ad8 --- /dev/null +++ b/home/desktop/apps/crypto.nix @@ -0,0 +1,16 @@ +# Cryptocurrency applications — Bisq, Monero GUI, and Trezor Suite. +{ + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.desktop.apps.crypto; +in { + options.desktop.apps.crypto.enable = mkEnableOption "enable crypto applications"; + + config = mkIf cfg.enable { + home.packages = with pkgs; [bisq2 monero-gui trezor-suite]; + }; +} diff --git a/home/desktop/apps/default.nix b/home/desktop/apps/default.nix new file mode 100644 index 0000000..05fb046 --- /dev/null +++ b/home/desktop/apps/default.nix @@ -0,0 +1,9 @@ +# Desktop apps aggregator — Obsidian, Office, web apps, and crypto tools. +{...}: { + imports = [ + ./obsidian.nix + ./office.nix + ./webapps.nix + ./crypto.nix + ]; +} diff --git a/home/desktop/apps/obsidian.nix b/home/desktop/apps/obsidian.nix new file mode 100644 index 0000000..588cb98 --- /dev/null +++ b/home/desktop/apps/obsidian.nix @@ -0,0 +1,25 @@ +# Obsidian knowledge base with markdown MIME association. +{ + config, + lib, + ... +}: +with lib; let + cfg = config.desktop.apps.obsidian; +in { + options.desktop.apps.obsidian.enable = mkEnableOption "enable Obsidian knowledge base"; + + config = mkIf cfg.enable { + programs.obsidian.enable = true; + + xdg.mimeApps = { + enable = true; + associations.added = { + "text/markdown" = ["obsidian.desktop"]; + }; + defaultApplications = { + "text/markdown" = ["obsidian.desktop"]; + }; + }; + }; +} diff --git a/home/desktop/apps/office.nix b/home/desktop/apps/office.nix new file mode 100644 index 0000000..3d9c062 --- /dev/null +++ b/home/desktop/apps/office.nix @@ -0,0 +1,16 @@ +# Office and productivity applications — LibreOffice and document tools. +{ + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.desktop.apps.office; +in { + options.desktop.apps.office.enable = mkEnableOption "install office and paperwork apps"; + + config = mkIf cfg.enable { + home.packages = [pkgs.libreoffice-fresh]; + }; +} diff --git a/home/desktop/apps/webapps.nix b/home/desktop/apps/webapps.nix new file mode 100644 index 0000000..d731fb9 --- /dev/null +++ b/home/desktop/apps/webapps.nix @@ -0,0 +1,56 @@ +# Web application desktop entries — Teams, Outlook, Basecamp, and OpenCode launchers. +{ + pkgs, + lib, + ... +}: let + icons = { + teams = pkgs.fetchurl { + url = "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/microsoft-teams.svg"; + sha256 = "sha256-Pr9QS8nnXJq97r4/G3c6JXi34zxHl0ps9gcyI8cN/s8="; + }; + outlook = pkgs.fetchurl { + url = "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/microsoft-outlook.svg"; + sha256 = "sha256-3u8t5QNHFZvrAegxBiGicO4PjtMWhEaQSCv7MSSfLLc="; + }; + opencode = pkgs.fetchurl { + url = "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/opencode-dark.svg"; + sha256 = "1lms4f8habamvdh2qqqz9psx4py9wx23mmlkkds44pvrbq3bkj3n"; + }; + }; +in { + xdg.desktopEntries = { + teams = { + name = "Microsoft Teams"; + exec = "launch-webapp https://teams.microsoft.com"; + comment = "Open Microsoft Teams as a Desktop App"; + categories = ["Application" "Network" "Chat"]; + terminal = false; + icon = icons.teams; + }; + outlook = { + name = "Microsoft Outlook"; + exec = "launch-webapp https://outlook.office.com/mail/"; + comment = "Open Microsoft Outlook as a Desktop App"; + categories = ["Application" "Network"]; + terminal = false; + icon = icons.outlook; + }; + basecamp = { + name = "Basecamp"; + exec = "launch-webapp https://3.basecamp.com/5996442/"; + comment = "Open Basecamp as a Desktop App"; + categories = ["Application" "Network"]; + terminal = false; + icon = "/home/sascha.koenig/.local/share/icons/basecamp-logo.png"; + }; + opencode = { + name = "Opencode"; + exec = "rofi-project-opener"; + comment = "Open Opencode Terminal App"; + categories = ["Application" "Development"]; + terminal = false; + icon = icons.opencode; + }; + }; +} diff --git a/home/desktop/default.nix b/home/desktop/default.nix new file mode 100644 index 0000000..ac73f43 --- /dev/null +++ b/home/desktop/default.nix @@ -0,0 +1,125 @@ +# Desktop environment aggregator — only loaded when context=desktop. +# Includes window manager, applications, theming, and desktop session config. +{ + config, + pkgs, + ... +}: { + imports = [ + ./wm + ./apps + ./theme + ]; + + xdg = { + enable = true; + configFile."mimeapps.list".force = true; + mimeApps = { + enable = true; + associations.added = { + "application/zip" = ["org.gnome.FileRoller.desktop"]; + "application/csv" = ["calc.desktop"]; + "application/pdf" = ["okularApplication_pdf.desktop"]; + }; + defaultApplications = { + "application/zip" = ["org.gnome.FileRoller.desktop"]; + "application/csv" = ["calc.desktop"]; + "application/pdf" = ["okularApplication_pdf.desktop"]; + "application/md" = ["nvim.desktop"]; + "application/text" = ["nvim.desktop"]; + "x-scheme-handler/http" = ["io.github.zen_browser.zen"]; + "x-scheme-handler/https" = ["io.github.zen_browser.zen"]; + }; + }; + userDirs = { + enable = true; + createDirectories = true; + setSessionVariables = true; + }; + }; + + home.sessionVariables = { + WEBKIT_DISABLE_COMPOSITING_MODE = "1"; + NIXOS_OZONE_WL = "1"; + TERMINAL = "ghostty"; + QT_QPA_PLATFORM = "wayland"; + XDG_CURRENT_DESKTOP = "Hyprland"; + XDG_SESSION_TYPE = "wayland"; + XDG_SESSION_DESKTOP = "Hyprland"; + }; + + home.sessionPath = [ + "\${XDG_BIN_HOME}" + "\${HOME}/.cargo/bin" + "$HOME/.npm-global/bin" + "$HOME/.cache/.bun/bin" + ]; + + fonts.fontconfig.enable = true; + + programs.ghostty = { + enable = true; + enableFishIntegration = true; + enableBashIntegration = true; + settings = { + font-family = "Fira Code"; + copy-on-select = true; + foreground = "#${config.colorScheme.palette.base05}"; + background = "#${config.colorScheme.palette.base00}"; + selection-foreground = "#${config.colorScheme.palette.base07}"; + selection-background = "#${config.colorScheme.palette.base02}"; + cursor-color = "#${config.colorScheme.palette.base05}"; + palette = [ + "0=#${config.colorScheme.palette.base01}" + "1=#${config.colorScheme.palette.base08}" + "2=#${config.colorScheme.palette.base0B}" + "3=#${config.colorScheme.palette.base0A}" + "4=#${config.colorScheme.palette.base0D}" + "5=#${config.colorScheme.palette.base0E}" + "6=#${config.colorScheme.palette.base0C}" + "7=#${config.colorScheme.palette.base05}" + "8=#${config.colorScheme.palette.base03}" + "9=#${config.colorScheme.palette.base08}" + "10=#${config.colorScheme.palette.base0B}" + "11=#${config.colorScheme.palette.base0A}" + "12=#${config.colorScheme.palette.base0D}" + "13=#${config.colorScheme.palette.base0E}" + "14=#${config.colorScheme.palette.base0C}" + "15=#${config.colorScheme.palette.base07}" + ]; + }; + }; + + home.pointerCursor = { + gtk.enable = true; + package = pkgs.bibata-cursors; + name = "Bibata-Modern-Ice"; + size = 20; + }; + + home.packages = with pkgs; [ + appimage-run + bemoji + brave + distrobox + eigent + (element-desktop.override { + commandLineArgs = "--password-store=gnome-libsecret"; + }) + launch-webapp + file-roller + hyprpanel + seahorse + sushi + ksnip + msty-studio + nwg-look + rose-pine-hyprcursor + remmina + slack + telegram-desktop + vivaldi + vivaldi-ffmpeg-codecs + vibetyper + ]; +} diff --git a/home/desktop/theme/default.nix b/home/desktop/theme/default.nix new file mode 100644 index 0000000..8445fe5 --- /dev/null +++ b/home/desktop/theme/default.nix @@ -0,0 +1,8 @@ +# Theme aggregator — fonts, GTK/Qt theming, and wallpapers. +{...}: { + imports = [ + ./fonts.nix + ./theme.nix + ./wallpapers.nix + ]; +} diff --git a/home/desktop/theme/fonts.nix b/home/desktop/theme/fonts.nix new file mode 100644 index 0000000..95eb69c --- /dev/null +++ b/home/desktop/theme/fonts.nix @@ -0,0 +1,24 @@ +# Font packages — Fira Code, JetBrains Mono Nerd Font, and supporting icon fonts. +{ + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.desktop.theme.fonts; +in { + options.desktop.theme.fonts.enable = mkEnableOption "install desktop fonts"; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ + fira-code + fira-code-symbols + nerd-fonts.fira-code + nerd-fonts.jetbrains-mono + font-manager + font-awesome_5 + noto-fonts + ]; + }; +} diff --git a/home/desktop/theme/theme.nix b/home/desktop/theme/theme.nix new file mode 100644 index 0000000..c78c598 --- /dev/null +++ b/home/desktop/theme/theme.nix @@ -0,0 +1,24 @@ +# GTK and Qt theming — Dracula theme with matching icons and cursor. +{ + pkgs, + config, + ... +}: { + qt = { + enable = true; + platformTheme.name = "gtk"; + }; + + gtk = { + enable = true; + theme = { + name = "Dracula"; + package = pkgs.dracula-theme; + }; + iconTheme = { + name = "Dracula"; + package = pkgs.dracula-icon-theme; + }; + gtk4.theme = config.gtk.theme; + }; +} diff --git a/home/desktop/theme/wallpapers.nix b/home/desktop/theme/wallpapers.nix new file mode 100644 index 0000000..24fd90c --- /dev/null +++ b/home/desktop/theme/wallpapers.nix @@ -0,0 +1,19 @@ +# Wallpaper collection — copies wallpapers to Hyprland config directory. +{ + config, + lib, + ... +}: +with lib; let + cfg = config.desktop.theme.wallpapers; +in { + options.desktop.theme.wallpapers = mkEnableOption "wallpapers for Hyprland"; + + config = mkIf cfg { + xdg.configFile."hypr/wallpapers" = { + # Wallpapers are stored relative to the home/m3tam3re directory. + source = ../../../m3tam3re/wallpapers; + recursive = true; + }; + }; +} diff --git a/home/desktop/wm/default.nix b/home/desktop/wm/default.nix new file mode 100644 index 0000000..796b018 --- /dev/null +++ b/home/desktop/wm/default.nix @@ -0,0 +1,8 @@ +# Window manager aggregator — Hyprland, Wayland tools, and Rofi launcher. +{...}: { + imports = [ + ./hyprland.nix + ./wayland.nix + ./rofi.nix + ]; +} diff --git a/home/desktop/wm/hyprland.nix b/home/desktop/wm/hyprland.nix new file mode 100644 index 0000000..75e3cd8 --- /dev/null +++ b/home/desktop/wm/hyprland.nix @@ -0,0 +1,318 @@ +# Hyprland window manager with keybindings, window rules, idle/lock, and hyprpaper. +{ + config, + lib, + ... +}: +with lib; let + cfg = config.desktop.wm.hyprland; +in { + options.desktop.wm.hyprland.enable = mkEnableOption "Hyprland window manager"; + + config = mkIf cfg.enable { + wayland.windowManager.hyprland = { + settings = { + xwayland = { + force_zero_scaling = true; + }; + + exec-once = [ + "hyprpanel" + "while ! hyprpaper-random; do sleep 0.5; done" + "wl-paste --type text --watch cliphist store" + "wl-paste --type image --watch cliphist store" + "vibetyper" + ]; + + env = [ + "XCURSOR_SIZE,32" + "HYPRCURSOR_THEME,Bibata-Modern-Ice" + "WLR_NO_HARDWARE_CURSORS,1" + "GTK_THEME,Dracula" + "XDG_CURRENT_DESKTOP,Hyprland" + "XDG_SESSION_TYPE,wayland" + "XDG_SESSION_DESKTOP,Hyprland" + "XKB_DEFAULT_LAYOUT,de" + "NIXOS_OZONE_WL,1" + ]; + + input = { + kb_layout = "de,us"; + kb_variant = ""; + kb_model = ""; + kb_rules = ""; + kb_options = "ctrl:nocaps"; + follow_mouse = 1; + }; + + general = { + gaps_in = 5; + gaps_out = 5; + border_size = 1; + "col.active_border" = "rgba(9742b5ee) rgba(9742b5ee) 45deg"; + "col.inactive_border" = "rgba(${config.colorScheme.palette.base03}aa)"; + layout = "dwindle"; + }; + + decoration = { + shadow = { + enabled = true; + range = 60; + render_power = 3; + color = "rgba(${config.colorScheme.palette.base00}66)"; + offset = "1 2"; + scale = 0.97; + }; + rounding = 8; + blur = { + enabled = true; + size = 3; + passes = 3; + }; + active_opacity = 0.9; + inactive_opacity = 0.5; + }; + + animations = { + enabled = true; + bezier = "myBezier, 0.05, 0.9, 0.1, 1.05"; + animation = [ + "windows, 1, 7, myBezier" + "windowsOut, 1, 7, default, popin 80%" + "border, 1, 10, default" + "borderangle, 1, 8, default" + "fade, 1, 7, default" + "workspaces, 1, 6, default" + ]; + }; + + dwindle = { + pseudotile = true; + preserve_split = true; + }; + + master = { + new_status = "master"; + }; + + device = [ + { + name = "epic-mouse-v1"; + sensitivity = -0.5; + } + { + name = "zsa-technology-labs-moonlander-mark-i"; + kb_layout = "us"; + } + { + name = "keychron-keychron-k7"; + kb_layout = "us"; + } + ]; + + windowrule = [ + "match:class file_progress, float on" + "match:class confirm, float on" + "match:class dialog, float on" + "match:class download, float on" + "match:class notification, float on" + "match:class error, float on" + "match:class splash, float on" + "match:class confirmreset, float on" + "match:title Open File, float on" + "match:title branchdialog, float on" + "match:class pavucontrol-qt, float on" + "match:class pavucontrol, float on" + "match:class class:^(espanso)$, float on" + "match:class wlogout, fullscreen on" + "match:title wlogout, float on" + "match:title wlogout, fullscreen on" + "match:class mpv, float on" + "match:class mpv, idle_inhibit focus" + "match:class mpv, opacity 1.0 override" + "match:title ^(Media viewer)$, float on" + "match:title ^(Volume Control)$, float on" + "match:title ^(Picture-in-Picture)$, float on" + "match:title ^(floating-pomodoro)$, float on" + "match:title ^(floating-pomodoro)$, size 250 50" + "match:title ^(floating-pomodoro)$, move 12 (monitor_h-150)" + "match:title ^(floating-pomodoro)$, pin on" + "match:initial_title .*streamlabs.com.*, float on" + "match:initial_title .*streamlabs.com.*, pin on" + "match:initial_title .*streamlabs.com.*, size 800 400" + "match:initial_title .*alert-box.*, move 100%-820 102" + "match:initial_title .*chat-box.*, move 100%-820 512" + "match:initial_title .*streamlabs.com.*, opacity 0.5 override" + "match:initial_title .*streamlabs.com.*, idle_inhibit focus" + "match:initial_title .*streamlabs.com.*, no_anim on" + "match:initial_title .*streamlabs.com.*, decorate off" + "match:initial_title .*streamlabs.com.*, no_shadow on" + "match:initial_title .*streamlabs.com.*, no_blur on" + "match:class ^vibe-typer$, match:title ^Recording Indicator$, no_blur on" + "border_color rgb(ffffff), match:xwayland 1" + ]; + + "$mainMod" = "SUPER"; + "$terminal" = "ghostty"; + + bind = [ + "$mainMod, return, exec, $terminal nu -c zellij-ps" + "$mainMod, t, exec, $terminal -e nu -c 'nitch; exec nu'" + "$mainMod SHIFT, t, exec, launch-timer" + "$mainMod, n, exec, $terminal -e nvim" + "$mainMod, z, exec, uwsm app -- zeditor" + "$mainMod, o, exec, hyprctl dispatch setprop activewindow opaque toggle" + "$mainMod, r, exec, hyprctl dispatch focuswindow \"initialtitle:.*alert-box.*\" && hyprctl dispatch moveactive exact 4300 102 && hyprctl dispatch focuswindow \"initialtitle:.*chat-box.*\" && hyprctl dispatch moveactive exact 4300 512" + "$mainMod, b, exec, uwsm app -- thunar" + "$mainMod SHIFT, B, exec, uwsm app -- vivaldi" + "$mainMod, Escape, exec, uwsm app -- wlogout -p layer-shell" + "$mainMod, Space, togglefloating" + "$mainMod, q, killactive" + "$mainMod, M, exit" + "$mainMod, F, fullscreen" + "$mainMod SHIFT, V, togglefloating" + "$mainMod, D, exec, uwsm app -- rofi -show drun -run-command \"uwsm app -- {cmd}\"" + "$mainMod, V, exec, uwsm app -- cliphist list | rofi -dmenu | cliphist decode | wl-copy" + "$mainMod, C, exec, bash -c 'FILE=/tmp/screenshot_$(date +%s).png; grim -g \"$(slurp)\" \"$FILE\" && ksnip \"$FILE\"'" + "$mainMod SHIFT, S, exec, uwsm app -- rofi -show emoji" + "$mainMod, P, exec, uwsm app -- rofi-pass" + "$mainMod SHIFT, P, pseudo" + "$mainMod, R, exec, stt-ptt start" + "$mainMod, S, exec, stt-ptt start" + "$mainMod, J, togglesplit" + "$mainMod, h, movefocus, l" + "$mainMod, l, movefocus, r" + "$mainMod, k, movefocus, u" + "$mainMod, j, movefocus, d" + "$mainMod, 1, workspace, 1" + "$mainMod, 2, workspace, 2" + "$mainMod, 3, workspace, 3" + "$mainMod, 4, workspace, 4" + "$mainMod, 5, workspace, 5" + "$mainMod, 6, workspace, 6" + "$mainMod, 7, workspace, 7" + "$mainMod, 8, workspace, 8" + "$mainMod, 9, workspace, 9" + "$mainMod, 0, workspace, 10" + "$mainMod SHIFT, 1, movetoworkspace, 1" + "$mainMod SHIFT, 2, movetoworkspace, 2" + "$mainMod SHIFT, 3, movetoworkspace, 3" + "$mainMod SHIFT, 4, movetoworkspace, 4" + "$mainMod SHIFT, 5, movetoworkspace, 5" + "$mainMod SHIFT, 6, movetoworkspace, 6" + "$mainMod SHIFT, 7, movetoworkspace, 7" + "$mainMod SHIFT, 8, movetoworkspace, 8" + "$mainMod SHIFT, 9, movetoworkspace, 9" + "$mainMod SHIFT, 0, movetoworkspace, 10" + "$mainMod, mouse_down, workspace, e+1" + "$mainMod, mouse_up, workspace, e-1" + ]; + + bindr = [ + "$mainMod, R, exec, stt-ptt stop" + "$mainMod, S, exec, stt-ptt format-stop" + ]; + + bindm = [ + "$mainMod, mouse:272, movewindow" + "$mainMod, mouse:273, resizewindow" + ]; + }; + }; + + services.hypridle = { + enable = true; + settings = { + general = { + before_sleep_cmd = "hyprlock"; + after_sleep_cmd = "hyprctl dispatch dpms on"; + inhibit_sleep = 3; + }; + listener = [ + { + timeout = 300; + on-timeout = "hyprlock"; + } + { + timeout = 420; + on-timeout = "hyprctl dispatch dpms off"; + on-resume = "hyprctl dispatch dpms on"; + } + ]; + }; + }; + + services.hyprpaper.enable = true; + + programs.hyprlock = { + enable = true; + settings = { + "$font" = "JetBrainsMono Nerd Font"; + "$base" = "rgb(${config.colorScheme.palette.base00})"; + "$text" = "rgb(${config.colorScheme.palette.base05})"; + "$textAlpha" = "${config.colorScheme.palette.base05}"; + "$accentAlpha" = "${config.colorScheme.palette.base0D}"; + "$red" = "rgb(${config.colorScheme.palette.base08})"; + "$yellow" = "rgb(${config.colorScheme.palette.base0A})"; + + general = { + hide_cursor = true; + }; + + background = { + monitor = ""; + path = "${config.home.homeDirectory}/.config/hypr/wallpapers/wallhaven-lmmo8r.jpg"; + blur_passes = 0; + color = "rgb(${config.colorScheme.palette.base00})"; + }; + + label = [ + { + monitor = ""; + text = "$TIME"; + color = "$text"; + font_size = 90; + font_family = "$font"; + position = "30, 0"; + halign = "left"; + valign = "top"; + } + { + monitor = ""; + text = ''cmd[update:43200000] echo "$(date +"%A, %d %B %Y")"''; + color = "$text"; + font_size = 25; + font_family = "$font"; + position = "30, -150"; + halign = "left"; + valign = "top"; + } + ]; + + input-field = [ + { + monitor = ""; + size = "300, 60"; + outline_thickness = 4; + dots_size = 0.2; + dots_spacing = 0.2; + dots_center = true; + outer_color = "rgb(${config.colorScheme.palette.base0D})"; + inner_color = "rgb(${config.colorScheme.palette.base00})"; + font_color = "rgb(${config.colorScheme.palette.base05})"; + fade_on_empty = false; + placeholder_text = ''󰌾 Logged in as $USER''; + hide_input = false; + check_color = "rgb(${config.colorScheme.palette.base0D})"; + fail_color = "rgb(${config.colorScheme.palette.base08})"; + fail_text = ''$FAIL ($ATTEMPTS)''; + capslock_color = "rgb(${config.colorScheme.palette.base0A})"; + position = "0, -35"; + halign = "center"; + valign = "center"; + } + ]; + }; + }; + }; +} diff --git a/home/desktop/wm/rofi.nix b/home/desktop/wm/rofi.nix new file mode 100644 index 0000000..d3c3a76 --- /dev/null +++ b/home/desktop/wm/rofi.nix @@ -0,0 +1,207 @@ +# Rofi application launcher with nix-colors theme, pass integration, and project opener. +{ + config, + pkgs, + lib, + ... +}: +with lib; let + cfg = config.desktop.wm.rofi; +in { + options.desktop.wm.rofi.enable = mkEnableOption "enable rofi"; + + config = mkIf cfg.enable { + programs.rofi = { + enable = true; + package = pkgs.rofi.override { + plugins = [ + pkgs.rofi-calc + pkgs.rofi-emoji + pkgs.stable.rofi-file-browser + ]; + }; + pass = { + enable = true; + package = pkgs.rofi-pass-wayland; + }; + terminal = "${pkgs.ghostty}/bin/ghostty"; + font = "Fira Code"; + extraConfig = { + show-icons = true; + disable-history = false; + modi = "drun,calc,emoji,filebrowser"; + kb-primary-paste = "Control+V,Shift+Insert"; + kb-secondary-paste = "Control+v,Insert"; + }; + theme = let + inherit (config.colorScheme) palette; + in + builtins.toString (pkgs.writeText "rofi-universal-theme.rasi" '' + * { + /* Universal theme colors from nix-colors */ + background: #${palette.base00}; + surface: #${palette.base01}; + overlay: #${palette.base02}; + muted: #${palette.base03}; + subtle: #${palette.base04}; + text: #${palette.base05}; + bright-text: #${palette.base06}; + highlight: #${palette.base07}; + accent1: #${palette.base08}; + accent2: #${palette.base09}; + accent3: #${palette.base0A}; + accent4: #${palette.base0B}; + accent5: #${palette.base0C}; + accent6: #${palette.base0D}; + accent7: #${palette.base0E}; + accent8: #${palette.base0F}; + + /* Global properties */ + background-color: @background; + text-color: @text; + font: "Fira Code 12"; + border: 0; + margin: 0; + padding: 0; + spacing: 0; + } + + window { + background-color: @background; + border: 1px; + border-color: @accent7; + border-radius: 6px; + width: 40%; + padding: 16px; + } + + inputbar { + children: [ prompt, entry ]; + spacing: 12px; + padding: 8px; + border-radius: 4px; + background-color: @surface; + } + + prompt { + text-color: @accent7; + background-color: transparent; + } + + entry { + placeholder: "Search..."; + placeholder-color: @subtle; + text-color: @text; + background-color: transparent; + cursor-color: @accent7; + } + + message { + background-color: @surface; + border-radius: 4px; + padding: 8px; + margin: 8px 0; + } + + textbox { + text-color: @text; + background-color: transparent; + } + + listview { + background-color: transparent; + margin: 8px 0 0; + lines: 10; + columns: 1; + fixed-height: true; + scrollbar: false; + } + + element { + background-color: transparent; + text-color: @text; + padding: 8px; + border-radius: 4px; + spacing: 8px; + } + + element normal.normal { + background-color: transparent; + text-color: @text; + } + + element selected.normal { + background-color: @accent7; + text-color: @background; + } + + element alternate.normal { + background-color: transparent; + text-color: @text; + } + + element-icon { + background-color: transparent; + size: 24px; + } + + element-text { + background-color: transparent; + text-color: inherit; + vertical-align: 0.5; + } + + mode-switcher { + spacing: 0; + background-color: @surface; + border-radius: 4px; + margin: 8px 0 0; + } + + button { + padding: 8px 16px; + background-color: transparent; + text-color: @text; + border-radius: 4px; + } + + button selected { + background-color: @accent7; + text-color: @background; + } + + scrollbar { + width: 4px; + border: 0; + handle-color: @accent7; + handle-width: 4px; + padding: 0; + } + ''); + }; + + cli.rofi-project-opener = { + enable = true; + projectDirs = { + AI = { + path = "~/p/AI"; + args = ""; + }; + CHAT = { + path = "~/p/CHAT"; + args = "--agent chiron"; + }; + MISC = { + path = "~/p/MISC"; + args = "--agent chiron-forge"; + }; + NIX = { + path = "~/p/NIX"; + args = ""; + }; + }; + terminal = pkgs.ghostty; + terminalCommand = "opencode %a"; + }; + }; +} diff --git a/home/desktop/wm/wayland.nix b/home/desktop/wm/wayland.nix new file mode 100644 index 0000000..1429d35 --- /dev/null +++ b/home/desktop/wm/wayland.nix @@ -0,0 +1,30 @@ +# Wayland extra tooling — screenshot, clipboard, cursor, and display utilities. +{ + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.desktop.wm.wayland; +in { + options.desktop.wm.wayland.enable = mkEnableOption "wayland extra tools and config"; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ + grim + hyprcursor + hyprlock + hyprpaper + qt6.qtwayland + slurp + waypipe + wl-clipboard + wf-recorder + wl-mirror + wlogout + wtype + ydotool + ]; + }; +} diff --git a/home/profiles/gaming/default.nix b/home/profiles/gaming/default.nix new file mode 100644 index 0000000..e1d0e47 --- /dev/null +++ b/home/profiles/gaming/default.nix @@ -0,0 +1,7 @@ +# Gaming profile aggregator — Steam platform and Gamescope session support. +{...}: { + imports = [ + ./steam.nix + ./gamescope.nix + ]; +} diff --git a/home/profiles/gaming/gamescope.nix b/home/profiles/gaming/gamescope.nix new file mode 100644 index 0000000..6f975cd --- /dev/null +++ b/home/profiles/gaming/gamescope.nix @@ -0,0 +1,16 @@ +# Gamescope — Valve's micro-compositor for Steam gaming sessions. +{ + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.profiles.gaming.gamescope; +in { + options.profiles.gaming.gamescope.enable = mkEnableOption "enable Gamescope session"; + + config = mkIf cfg.enable { + home.packages = [pkgs.gamescope]; + }; +} diff --git a/home/profiles/gaming/steam.nix b/home/profiles/gaming/steam.nix new file mode 100644 index 0000000..92a24c1 --- /dev/null +++ b/home/profiles/gaming/steam.nix @@ -0,0 +1,21 @@ +# Steam gaming platform with Steam Deck compatibility tools and gaming utilities. +{ + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.profiles.gaming.steam; +in { + options.profiles.gaming.steam.enable = mkEnableOption "enable Steam gaming"; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ + gamemode + goverlay + mangohud + protonplus + ]; + }; +} diff --git a/home/profiles/media/default.nix b/home/profiles/media/default.nix new file mode 100644 index 0000000..0f453a5 --- /dev/null +++ b/home/profiles/media/default.nix @@ -0,0 +1,10 @@ +# Media profile aggregator — OBS, FFmpeg, yt-dlp, Kdenlive, and HandBrake. +{...}: { + imports = [ + ./obs.nix + ./ffmpeg.nix + ./yt-dlp.nix + ./kdenlive.nix + ./handbrake.nix + ]; +} diff --git a/home/profiles/media/ffmpeg.nix b/home/profiles/media/ffmpeg.nix new file mode 100644 index 0000000..287e32c --- /dev/null +++ b/home/profiles/media/ffmpeg.nix @@ -0,0 +1,24 @@ +# FFmpeg — full-featured multimedia processing toolchain. +{ + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.profiles.media.ffmpeg; +in { + options.profiles.media.ffmpeg.enable = mkEnableOption "enable FFmpeg tools"; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ + amf + ffmpeg_6-full + gst_all_1.gstreamer + gst_all_1.gst-vaapi + pamixer + pavucontrol + qpwgraph + ]; + }; +} diff --git a/home/profiles/media/handbrake.nix b/home/profiles/media/handbrake.nix new file mode 100644 index 0000000..f14ff5d --- /dev/null +++ b/home/profiles/media/handbrake.nix @@ -0,0 +1,21 @@ +# HandBrake — open-source video transcoder. +{ + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.profiles.media.handbrake; +in { + options.profiles.media.handbrake.enable = mkEnableOption "enable HandBrake transcoder"; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ + handbrake + gimp + inkscape + libation + ]; + }; +} diff --git a/home/profiles/media/kdenlive.nix b/home/profiles/media/kdenlive.nix new file mode 100644 index 0000000..f3a4dbd --- /dev/null +++ b/home/profiles/media/kdenlive.nix @@ -0,0 +1,16 @@ +# Kdenlive — KDE non-linear video editor. +{ + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.profiles.media.kdenlive; +in { + options.profiles.media.kdenlive.enable = mkEnableOption "enable Kdenlive video editor"; + + config = mkIf cfg.enable { + home.packages = [pkgs.kdePackages.kdenlive]; + }; +} diff --git a/home/profiles/media/obs.nix b/home/profiles/media/obs.nix new file mode 100644 index 0000000..2a6f22c --- /dev/null +++ b/home/profiles/media/obs.nix @@ -0,0 +1,21 @@ +# OBS Studio — open broadcaster software for streaming and recording. +{ + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.profiles.media.obs; +in { + options.profiles.media.obs.enable = mkEnableOption "enable OBS Studio"; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ + v4l-utils + ]; + + # OBS is managed via NixOS programs.obs-studio at the system level. + # Home-manager only installs supporting tools. + }; +} diff --git a/home/profiles/media/yt-dlp.nix b/home/profiles/media/yt-dlp.nix new file mode 100644 index 0000000..982f585 --- /dev/null +++ b/home/profiles/media/yt-dlp.nix @@ -0,0 +1,31 @@ +# yt-dlp and media playback — YouTube downloader with MPV integration. +{ + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.profiles.media.ytDlp; +in { + options.profiles.media.ytDlp.enable = mkEnableOption "enable yt-dlp and media playback"; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ + plexamp + webcord + ]; + + programs.mpv = { + enable = true; + bindings = { + WHEEL_UP = "seek 10"; + WHEEL_DOWN = "seek -10"; + }; + config = { + profile = "gpu-hq"; + ytdl-format = "bestvideo+bestaudio"; + }; + }; + }; +} diff --git a/home/server/default.nix b/home/server/default.nix new file mode 100644 index 0000000..2c6d8ea --- /dev/null +++ b/home/server/default.nix @@ -0,0 +1,6 @@ +# Server context home-manager configuration — minimal headless setup. +# Loaded on server hosts: m3-atlas, m3-helios, m3-aether. +{...}: { + # Server hosts use the base and coding modules directly. + # No desktop environment or GUI applications. +} From 9908b9e335f57f3097e8ea84701b2dc2f7cc2009 Mon Sep 17 00:00:00 2001 From: m3tm3re Date: Sun, 26 Apr 2026 10:49:01 +0200 Subject: [PATCH 02/13] fix: code review fixes - Fix hardcoded user path in webapps.nix (use homeDirectory) - Normalize wallpapers option to use .enable suffix - Remove duplicate FZF keybind declaration - Update comments to match actual implementation --- home/base/cli-tools/fzf.nix | 1 - home/base/shell/nushell.nix | 2 +- home/coding/agents/agents.nix | 3 ++- home/coding/editor/default.nix | 2 +- home/desktop/apps/webapps.nix | 4 ++-- home/desktop/theme/wallpapers.nix | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/home/base/cli-tools/fzf.nix b/home/base/cli-tools/fzf.nix index 8939199..f4ef6af 100644 --- a/home/base/cli-tools/fzf.nix +++ b/home/base/cli-tools/fzf.nix @@ -31,7 +31,6 @@ in { "--preview='bat --color=always -n {}'" "--bind 'ctrl-/:toggle-preview'" "--header 'Press CTRL-Y to copy command into clipboard'" - "--bind 'ctrl-/:toggle-preview'" "--bind 'ctrl-y:execute-silent(echo -n {2..} | wl-copy)+abort'" ]; defaultCommand = "fd --type f --exclude .git --follow --hidden"; diff --git a/home/base/shell/nushell.nix b/home/base/shell/nushell.nix index 9616531..9bf837a 100644 --- a/home/base/shell/nushell.nix +++ b/home/base/shell/nushell.nix @@ -21,7 +21,7 @@ in { $env.EDITOR = "nvim" $env.VISUAL = "zeditor" $env.FZF_DEFAULT_COMMAND = "fd --type f --exclude .git --follow --hidden" - $env.FZF_DEFAULT_OPTS = "--preview='bat --color=always -n {}' --bind 'ctrl-/:toggle-preview' --header 'Press CTRL-Y to copy command into clipboard' --bind 'ctrl-/:toggle-preview' --bind 'ctrl-y:execute-silent(echo -n {2..} | wl-copy)+abort' --color bg:#282a36,bg+:#44475a,fg:#f8f8f2,fg+:#f8f8f2,header:#6272a4,hl:#bd93f9,hl+:#bd93f9,info:#ffb86c,marker:#ff79c6,pointer:#ff79c6,prompt:#50fa7b,spinner:#ffb86c" + $env.FZF_DEFAULT_OPTS = "--preview='bat --color=always -n {}' --bind 'ctrl-/:toggle-preview' --header 'Press CTRL-Y to copy command into clipboard' --bind 'ctrl-y:execute-silent(echo -n {2..} | wl-copy)+abort' --color bg:#282a36,bg+:#44475a,fg:#f8f8f2,fg+:#f8f8f2,header:#6272a4,hl:#bd93f9,hl+:#bd93f9,info:#ffb86c,marker:#ff79c6,pointer:#ff79c6,prompt:#50fa7b,spinner:#ffb86c" $env.XDG_DATA_HOME = $"($env.HOME)/.local/share" $env.SSH_AUTH_SOCK = "/run/user/1000/gnupg/S.gpg-agent.ssh" $env.PATH = ($env.PATH | split row (char esep) | append $"($env.HOME)/.cache/.bun/bin" | append $"($env.HOME)/.npm-global/bin" | uniq) diff --git a/home/coding/agents/agents.nix b/home/coding/agents/agents.nix index ca014a7..2945551 100644 --- a/home/coding/agents/agents.nix +++ b/home/coding/agents/agents.nix @@ -1,5 +1,6 @@ # AI agent system — OpenCode, Pi, and MCP server configuration. -# References inputs.m3ta-nixpkgs.homeManagerModules.coding.agents for the base module. +# Relies on coding.agents options provided by home/common/default.nix +# (inputs.m3ta-nixpkgs.homeManagerModules.default). { config, inputs, diff --git a/home/coding/editor/default.nix b/home/coding/editor/default.nix index 6c02d36..2f18bca 100644 --- a/home/coding/editor/default.nix +++ b/home/coding/editor/default.nix @@ -1,4 +1,4 @@ -# Editor aggregator — delegates to m3ta-nixpkgs editors module for NeoVim and Zed. +# Editor aggregator — delegates to m3ta-nixpkgs editor modules. {...}: { imports = [ ./neovim.nix diff --git a/home/desktop/apps/webapps.nix b/home/desktop/apps/webapps.nix index d731fb9..8c34b96 100644 --- a/home/desktop/apps/webapps.nix +++ b/home/desktop/apps/webapps.nix @@ -1,7 +1,7 @@ # Web application desktop entries — Teams, Outlook, Basecamp, and OpenCode launchers. { + config, pkgs, - lib, ... }: let icons = { @@ -42,7 +42,7 @@ in { comment = "Open Basecamp as a Desktop App"; categories = ["Application" "Network"]; terminal = false; - icon = "/home/sascha.koenig/.local/share/icons/basecamp-logo.png"; + icon = "${config.home.homeDirectory}/.local/share/icons/basecamp-logo.png"; }; opencode = { name = "Opencode"; diff --git a/home/desktop/theme/wallpapers.nix b/home/desktop/theme/wallpapers.nix index 24fd90c..2b8617d 100644 --- a/home/desktop/theme/wallpapers.nix +++ b/home/desktop/theme/wallpapers.nix @@ -5,9 +5,9 @@ ... }: with lib; let - cfg = config.desktop.theme.wallpapers; + cfg = config.desktop.theme.wallpapers.enable; in { - options.desktop.theme.wallpapers = mkEnableOption "wallpapers for Hyprland"; + options.desktop.theme.wallpapers.enable = mkEnableOption "wallpapers for Hyprland"; config = mkIf cfg { xdg.configFile."hypr/wallpapers" = { From f3749c567989704c1bfd7c11c0da7e77c0768a50 Mon Sep 17 00:00:00 2001 From: m3tm3re Date: Sun, 26 Apr 2026 11:03:43 +0200 Subject: [PATCH 03/13] feat: implement profile system with mkHomeConfig and context constraints - Add home/lib/default.nix with mkHomeConfig utility - Loads base + common modules always - Maps profiles (coding, gaming, media) to module imports - Enforces desktop/server mutual exclusion via assertion - Context must be 'desktop', 'server', or null - Migrate all per-host home configs to new profile system - m3-ares: context=desktop, profiles=[coding, gaming, media] - m3-kratos: context=desktop, profiles=[coding, gaming, media] - m3-atlas: context=server, profiles=[coding] - m3-helios: context=server, profiles=[] - m3-hermes: context=server, profiles=[] - m3-aether: context=server, profiles=[] - m3-daedalus: context=desktop, profiles=[coding, media] - Replace features.* options with new namespaces: - features.cli.* -> base.shell.* / base.cliTools.* / base.secrets - features.desktop.* -> desktop.wm.* / desktop.apps.* / desktop.theme.* - gaming/media moved to profiles.gaming.* / profiles.media.* - Fix home/coding/editor/neovim.nix: remove duplicate option declaration (coding.editors.neovim.enable already declared by m3ta-nixpkgs) - Fix home/coding/lsp/servers.nix: replace removed nodePackages.typescript-language-server with typescript-language-server - Fix home/desktop/theme/wallpapers.nix: correct relative path (was ../../.. which resolved to project root, should be ../..) --- home/coding/editor/neovim.nix | 20 ++--- home/coding/lsp/servers.nix | 2 +- home/desktop/theme/wallpapers.nix | 2 +- home/lib/default.nix | 81 +++++++++++++++++++ home/m3tam3re/m3-aether.nix | 32 ++++++-- home/m3tam3re/m3-ares.nix | 127 ++++++++++++++++++++---------- home/m3tam3re/m3-atlas.nix | 30 +++++-- home/m3tam3re/m3-daedalus.nix | 125 ++++++++++++++++++----------- home/m3tam3re/m3-helios.nix | 32 ++++++-- home/m3tam3re/m3-hermes.nix | 32 ++++++-- home/m3tam3re/m3-kratos.nix | 120 ++++++++++++++++++---------- 11 files changed, 422 insertions(+), 181 deletions(-) create mode 100644 home/lib/default.nix diff --git a/home/coding/editor/neovim.nix b/home/coding/editor/neovim.nix index 9c555c4..79c101e 100644 --- a/home/coding/editor/neovim.nix +++ b/home/coding/editor/neovim.nix @@ -1,17 +1,7 @@ # NeoVim base configuration via m3ta-nixpkgs coding.editors module. -{ - config, - lib, - ... -}: -with lib; let - cfg = config.coding.editors.neovim; -in { - # coding.editors.neovim is provided by inputs.m3ta-nixpkgs.homeManagerModules.default - options.coding.editors.neovim.enable = mkEnableOption "enable NeoVim editor"; - - config = mkIf cfg.enable { - # NeoVim configuration is managed by the m3ta-nixpkgs coding.editors module. - # Additional host-specific overrides can be added here. - }; +# The option `coding.editors.neovim.enable` is declared by +# inputs.m3ta-nixpkgs.homeManagerModules.default — no re-declaration here. +{...}: { + # Placeholder for host-agnostic NeoVim overrides. + # Set coding.editors.neovim.enable = true in per-host files to activate. } diff --git a/home/coding/lsp/servers.nix b/home/coding/lsp/servers.nix index 935855e..0e01947 100644 --- a/home/coding/lsp/servers.nix +++ b/home/coding/lsp/servers.nix @@ -15,7 +15,7 @@ in { # Nix nixd # General - nodePackages.typescript-language-server + typescript-language-server tailwindcss-language-server ]; }; diff --git a/home/desktop/theme/wallpapers.nix b/home/desktop/theme/wallpapers.nix index 2b8617d..bcf6c34 100644 --- a/home/desktop/theme/wallpapers.nix +++ b/home/desktop/theme/wallpapers.nix @@ -12,7 +12,7 @@ in { config = mkIf cfg { xdg.configFile."hypr/wallpapers" = { # Wallpapers are stored relative to the home/m3tam3re directory. - source = ../../../m3tam3re/wallpapers; + source = ../../m3tam3re/wallpapers; recursive = true; }; }; diff --git a/home/lib/default.nix b/home/lib/default.nix new file mode 100644 index 0000000..d527a28 --- /dev/null +++ b/home/lib/default.nix @@ -0,0 +1,81 @@ +# home/lib/default.nix +# Profile loading utilities for home-manager configurations. +# +# Usage: +# let homeLib = import ../lib { inherit lib; }; +# in { +# imports = [ +# (homeLib.mkHomeConfig { profiles = ["coding" "gaming"]; context = "desktop"; }) +# ]; +# } +{ lib }: + +let + inherit (lib) optional; + + # Infrastructure layer — nixpkgs overlays, nix-colors, m3ta-nixpkgs modules. + # Always loaded on every host. + commonModule = ../common; + + # Base user environment — shell (nushell, starship), CLI tools, secrets. + # Always loaded on every host. + baseModule = ../base; + + # Context-specific modules — desktop and server are mutually exclusive. + contextModuleMap = { + desktop = ../desktop; + server = ../server; + }; + + # Profile modules — freely combinable additions on top of base + context. + profileModuleMap = { + coding = ../coding; + gaming = ../profiles/gaming; + media = ../profiles/media; + }; + +in { + # Generate a home-manager module with imports based on profiles and context. + # + # Args: + # profiles: list of profile names (e.g. ["coding" "gaming" "media"]) + # context: host context, one of "desktop" | "server" | null + # + # Returns: a home-manager module attrset with imports and assertions. + # Desktop and server contexts are mutually exclusive by design — passing + # any value other than "desktop", "server", or null causes an assertion + # failure at evaluation time. + mkHomeConfig = { + profiles ? [], + context ? null, + }: + let + contextImport = + if context == "desktop" then [ contextModuleMap.desktop ] + else if context == "server" then [ contextModuleMap.server ] + else []; + + activeProfiles = builtins.filter + (profileName: builtins.hasAttr profileName profileModuleMap) + profiles; + + profileImports = map (profileName: profileModuleMap.${profileName}) activeProfiles; + + contextStr = if context == null then "null" else context; + + in { + imports = + [ commonModule baseModule ] + ++ contextImport + ++ profileImports; + + assertions = [ + { + assertion = builtins.elem context [ "desktop" "server" null ]; + message = + "m3ta home: context must be 'desktop', 'server', or null" + + " (got: '${contextStr}')"; + } + ]; + }; +} diff --git a/home/m3tam3re/m3-aether.nix b/home/m3tam3re/m3-aether.nix index 0f6c41d..510fbb5 100644 --- a/home/m3tam3re/m3-aether.nix +++ b/home/m3tam3re/m3-aether.nix @@ -1,17 +1,33 @@ +# m3-aether — cloud VM. +# Context: server | Profiles: (none) { + lib, + ... +}: +let + homeLib = import ../lib { inherit lib; }; +in { imports = [ - ../common - ../features/cli + (homeLib.mkHomeConfig { + profiles = [ ]; + context = "server"; + }) ./home-server.nix + # Fish shell — no equivalent in new base module yet + ../features/cli/fish.nix ]; - features = { - cli = { - fish.enable = true; - fzf.enable = true; - nitch.enable = true; - secrets.enable = false; + # Base CLI tools (new namespace) + base = { + shell = { starship.enable = true; }; + cliTools = { + fzf.enable = true; + nitch.enable = true; + }; }; + + # Fish shell (legacy — no new equivalent yet) + features.cli.fish.enable = true; } diff --git a/home/m3tam3re/m3-ares.nix b/home/m3tam3re/m3-ares.nix index 43f03dd..9e2b0aa 100644 --- a/home/m3tam3re/m3-ares.nix +++ b/home/m3tam3re/m3-ares.nix @@ -1,74 +1,115 @@ +# m3-ares — TUXEDO laptop desktop workstation. +# Context: desktop | Profiles: coding, gaming, media { config, lib, ... }: +let + homeLib = import ../lib { inherit lib; }; +in with lib; { imports = [ - ../common + (homeLib.mkHomeConfig { + profiles = [ "coding" "gaming" "media" ]; + context = "desktop"; + }) ./home.nix - ../features/cli - ../features/coding - ../features/desktop + # Fish shell — no equivalent in new base module yet + ../features/cli/fish.nix ]; config = mkMerge [ { + # Base CLI tools (new namespace) + base = { + shell = { + nushell.enable = true; + starship.enable = true; + }; + cliTools = { + fzf.enable = true; + nitch.enable = true; + television.enable = true; + }; + secrets.enable = true; + }; + + # Fish shell (legacy — features namespace, no new equivalent yet) + features.cli.fish.enable = true; + + # Desktop features (new namespace) + desktop = { + wm = { + hyprland.enable = true; + rofi.enable = true; + wayland.enable = true; + }; + apps = { + crypto.enable = true; + obsidian.enable = true; + office.enable = true; + }; + theme = { + fonts.enable = true; + wallpapers.enable = true; + }; + }; + + # Coding environment + coding = { + editors = { + neovim.enable = true; + zed.enable = true; + }; + lsp.enable = true; + }; + + # Gaming profile features + profiles.gaming = { + steam.enable = true; + gamescope.enable = true; + }; + + # Media profile features + profiles.media = { + obs.enable = true; + ffmpeg.enable = true; + kdenlive.enable = true; + ytDlp.enable = true; + }; + xdg = { - # TODO: better structure enable = true; configFile."mimeapps.list".force = true; mimeApps = { enable = true; associations.added = { - "application/zip" = ["org.gnome.FileRoller.desktop"]; - "application/csv" = ["calc.desktop"]; - "application/pdf" = ["vivaldi-stable.desktop"]; - "x-scheme-handler/http" = ["vivaldi-stable.desktop"]; - "x-scheme-handler/https" = ["vivaldi-stable.desktop"]; + "application/zip" = [ "org.gnome.FileRoller.desktop" ]; + "application/csv" = [ "calc.desktop" ]; + "application/pdf" = [ "vivaldi-stable.desktop" ]; + "x-scheme-handler/http" = [ "vivaldi-stable.desktop" ]; + "x-scheme-handler/https" = [ "vivaldi-stable.desktop" ]; }; defaultApplications = { - "application/zip" = ["org.gnome.FileRoller.desktop"]; - "application/csv" = ["calc.desktop"]; - "application/pdf" = ["vivaldi-stable.desktop"]; - "application/md" = ["dev.zed.Zed.desktop"]; - "application/text" = ["dev.zed.Zed.desktop"]; - "x-scheme-handler/http" = ["vivaldi-stable.desktop"]; - "x-scheme-handler/https" = ["vivaldi-stable.desktop"]; + "application/zip" = [ "org.gnome.FileRoller.desktop" ]; + "application/csv" = [ "calc.desktop" ]; + "application/pdf" = [ "vivaldi-stable.desktop" ]; + "application/md" = [ "dev.zed.Zed.desktop" ]; + "application/text" = [ "dev.zed.Zed.desktop" ]; + "x-scheme-handler/http" = [ "vivaldi-stable.desktop" ]; + "x-scheme-handler/https" = [ "vivaldi-stable.desktop" ]; }; }; }; - features = { - cli = { - fish.enable = true; - nushell.enable = true; - fzf.enable = true; - nitch.enable = true; - secrets.enable = true; - starship.enable = true; - television.enable = true; - }; - desktop = { - coding.enable = true; - crypto.enable = true; - gaming.enable = true; - hyprland.enable = true; - media.enable = true; - obsidian.enable = true; - office.enable = true; - rofi.enable = true; - fonts.enable = true; - wayland.enable = true; - wallpapers = true; - }; - }; } - (mkIf config.features.desktop.hyprland.enable { + # Host-specific Hyprland monitor and workspace layout + (mkIf config.desktop.wm.hyprland.enable { wayland.windowManager.hyprland = { enable = true; settings = { - exec-once = ["tuxedo-backlight"]; + exec-once = [ "tuxedo-backlight" ]; monitor = [ "eDP-1,preferred,0x0,1.25" "HDMI-A-1,1920x1080@120,2560x0,1" diff --git a/home/m3tam3re/m3-atlas.nix b/home/m3tam3re/m3-atlas.nix index 1738953..161798f 100644 --- a/home/m3tam3re/m3-atlas.nix +++ b/home/m3tam3re/m3-atlas.nix @@ -1,19 +1,33 @@ +# m3-atlas — primary server, Traefik hub and container host. +# Context: server | Profiles: coding { + lib, + ... +}: +let + homeLib = import ../lib { inherit lib; }; +in { imports = [ - ../common - ../features/cli - ../features/coding/opencode.nix + (homeLib.mkHomeConfig { + profiles = [ "coding" ]; + context = "server"; + }) ./home-server.nix ]; - coding.editors.neovim.enable = true; - features = { - cli = { + + # Base CLI tools (new namespace) + base = { + shell = { nushell.enable = true; + starship.enable = true; + }; + cliTools = { fzf.enable = true; nitch.enable = true; - secrets.enable = false; - starship.enable = true; zellij.enable = true; }; }; + + # Coding environment + coding.editors.neovim.enable = true; } diff --git a/home/m3tam3re/m3-daedalus.nix b/home/m3tam3re/m3-daedalus.nix index 370ca5d..f97209c 100644 --- a/home/m3tam3re/m3-daedalus.nix +++ b/home/m3tam3re/m3-daedalus.nix @@ -1,74 +1,105 @@ +# m3-daedalus — portable laptop (standalone home-manager). +# Context: desktop | Profiles: coding, media { config, lib, ... }: -with lib; let - cfg = config.features.desktop.hyprland; -in { +let + homeLib = import ../lib { inherit lib; }; +in +with lib; { imports = [ - ../common + (homeLib.mkHomeConfig { + profiles = [ "coding" "media" ]; + context = "desktop"; + }) ./home.nix - ../features/cli - ../features/coding - ../features/desktop - #./services/librechat.nix + # Fish shell — no equivalent in new base module yet + ../features/cli/fish.nix ]; - options.features.desktop.hyprland.enable = - mkEnableOption "enable Hyprland"; - config = mkMerge [ - # Base configuration { + # Base CLI tools (new namespace) + base = { + shell = { + nushell.enable = true; + starship.enable = true; + }; + cliTools = { + fzf.enable = true; + nitch.enable = true; + television.enable = true; + }; + secrets.enable = true; + }; + + # Fish shell (legacy — no new equivalent yet) + features.cli.fish.enable = true; + + # Desktop features (new namespace) + desktop = { + wm = { + hyprland.enable = false; + rofi.enable = true; + wayland.enable = false; + }; + apps = { + obsidian.enable = true; + office.enable = false; + crypto.enable = false; + }; + theme = { + fonts.enable = true; + wallpapers.enable = false; + }; + }; + + # Coding environment + coding = { + editors = { + neovim.enable = true; + zed.enable = true; + }; + lsp.enable = true; + }; + + # Media profile features + profiles.media = { + obs.enable = false; + ffmpeg.enable = false; + kdenlive.enable = false; + ytDlp.enable = true; + }; + xdg = { - # TODO: better structure enable = true; configFile."mimeapps.list".force = true; mimeApps = { enable = true; associations.added = { - "application/zip" = ["org.gnome.FileRoller.desktop"]; - "application/csv" = ["calc.desktop"]; - "application/pdf" = ["vivaldi-stable.desktop"]; - "x-scheme-handler/http" = ["vivaldi-stable.desktop"]; - "x-scheme-handler/https" = ["vivaldi-stable.desktop"]; + "application/zip" = [ "org.gnome.FileRoller.desktop" ]; + "application/csv" = [ "calc.desktop" ]; + "application/pdf" = [ "vivaldi-stable.desktop" ]; + "x-scheme-handler/http" = [ "vivaldi-stable.desktop" ]; + "x-scheme-handler/https" = [ "vivaldi-stable.desktop" ]; }; defaultApplications = { - "application/zip" = ["org.gnome.FileRoller.desktop"]; - "application/csv" = ["calc.desktop"]; - "application/pdf" = ["vivaldi-stable.desktop"]; - "application/md" = ["dev.zed.Zed.desktop"]; - "application/text" = ["dev.zed.Zed.desktop"]; - "x-scheme-handler/http" = ["vivaldi-stable.desktop"]; - "x-scheme-handler/https" = ["vivaldi-stable.desktop"]; + "application/zip" = [ "org.gnome.FileRoller.desktop" ]; + "application/csv" = [ "calc.desktop" ]; + "application/pdf" = [ "vivaldi-stable.desktop" ]; + "application/md" = [ "dev.zed.Zed.desktop" ]; + "application/text" = [ "dev.zed.Zed.desktop" ]; + "x-scheme-handler/http" = [ "vivaldi-stable.desktop" ]; + "x-scheme-handler/https" = [ "vivaldi-stable.desktop" ]; }; }; }; - features = { - cli = { - fish.enable = true; - nushell.enable = true; - fzf.enable = true; - nitch.enable = true; - secrets.enable = true; - starship.enable = true; - }; - desktop = { - coding.enable = true; - crypto.enable = false; - gaming.enable = false; - hyprland.enable = false; - media.enable = true; - office.enable = false; - rofi.enable = true; - fonts.enable = true; - wayland.enable = false; - }; - }; } - (mkIf cfg.enable { + # Host-specific Hyprland layout — only applies when hyprland is enabled + (mkIf config.desktop.wm.hyprland.enable { wayland.windowManager.hyprland = { enable = true; settings = { diff --git a/home/m3tam3re/m3-helios.nix b/home/m3tam3re/m3-helios.nix index 0f6c41d..27f6b41 100644 --- a/home/m3tam3re/m3-helios.nix +++ b/home/m3tam3re/m3-helios.nix @@ -1,17 +1,33 @@ +# m3-helios — AdGuard DNS and internal routing server. +# Context: server | Profiles: (none) { + lib, + ... +}: +let + homeLib = import ../lib { inherit lib; }; +in { imports = [ - ../common - ../features/cli + (homeLib.mkHomeConfig { + profiles = [ ]; + context = "server"; + }) ./home-server.nix + # Fish shell — no equivalent in new base module yet + ../features/cli/fish.nix ]; - features = { - cli = { - fish.enable = true; - fzf.enable = true; - nitch.enable = true; - secrets.enable = false; + # Base CLI tools (new namespace) + base = { + shell = { starship.enable = true; }; + cliTools = { + fzf.enable = true; + nitch.enable = true; + }; }; + + # Fish shell (legacy — no new equivalent yet) + features.cli.fish.enable = true; } diff --git a/home/m3tam3re/m3-hermes.nix b/home/m3tam3re/m3-hermes.nix index 0f6c41d..a70e6b3 100644 --- a/home/m3tam3re/m3-hermes.nix +++ b/home/m3tam3re/m3-hermes.nix @@ -1,17 +1,33 @@ +# m3-hermes — secondary server. +# Context: server | Profiles: (none) { + lib, + ... +}: +let + homeLib = import ../lib { inherit lib; }; +in { imports = [ - ../common - ../features/cli + (homeLib.mkHomeConfig { + profiles = [ ]; + context = "server"; + }) ./home-server.nix + # Fish shell — no equivalent in new base module yet + ../features/cli/fish.nix ]; - features = { - cli = { - fish.enable = true; - fzf.enable = true; - nitch.enable = true; - secrets.enable = false; + # Base CLI tools (new namespace) + base = { + shell = { starship.enable = true; }; + cliTools = { + fzf.enable = true; + nitch.enable = true; + }; }; + + # Fish shell (legacy — no new equivalent yet) + features.cli.fish.enable = true; } diff --git a/home/m3tam3re/m3-kratos.nix b/home/m3tam3re/m3-kratos.nix index 70c5824..7d23493 100644 --- a/home/m3tam3re/m3-kratos.nix +++ b/home/m3tam3re/m3-kratos.nix @@ -1,69 +1,106 @@ +# m3-kratos — AMD desktop workstation. +# Context: desktop | Profiles: coding, gaming, media { config, lib, ... }: +let + homeLib = import ../lib { inherit lib; }; +in with lib; { imports = [ - ../common + (homeLib.mkHomeConfig { + profiles = [ "coding" "gaming" "media" ]; + context = "desktop"; + }) ./home.nix - ../features/cli - ../features/coding - ../features/desktop ]; config = mkMerge [ { + # Base CLI tools (new namespace) + base = { + shell = { + nushell.enable = true; + starship.enable = true; + }; + cliTools = { + fzf.enable = true; + nitch.enable = true; + television.enable = true; + }; + secrets.enable = true; + }; + + # Desktop features (new namespace) + desktop = { + wm = { + hyprland.enable = true; + rofi.enable = true; + wayland.enable = true; + }; + apps = { + crypto.enable = true; + obsidian.enable = true; + office.enable = true; + }; + theme = { + fonts.enable = true; + wallpapers.enable = true; + }; + }; + + # Coding environment + coding = { + editors = { + neovim.enable = true; + zed.enable = true; + }; + lsp.enable = true; + }; + + # Gaming profile features + profiles.gaming = { + steam.enable = true; + gamescope.enable = true; + }; + + # Media profile features + profiles.media = { + obs.enable = true; + ffmpeg.enable = true; + kdenlive.enable = true; + ytDlp.enable = true; + }; + xdg = { - # TODO: better structure enable = true; configFile."mimeapps.list".force = true; mimeApps = { enable = true; associations.added = { - "application/zip" = ["org.gnome.FileRoller.desktop"]; - "application/csv" = ["calc.desktop"]; - "application/pdf" = ["vivaldi-stable.desktop"]; - "x-scheme-handler/http" = ["vivaldi-stable.desktop"]; - "x-scheme-handler/https" = ["vivaldi-stable.desktop"]; + "application/zip" = [ "org.gnome.FileRoller.desktop" ]; + "application/csv" = [ "calc.desktop" ]; + "application/pdf" = [ "vivaldi-stable.desktop" ]; + "x-scheme-handler/http" = [ "vivaldi-stable.desktop" ]; + "x-scheme-handler/https" = [ "vivaldi-stable.desktop" ]; }; defaultApplications = { - "application/zip" = ["org.gnome.FileRoller.desktop"]; - "application/csv" = ["calc.desktop"]; - "application/pdf" = ["vivaldi-stable.desktop"]; - "application/md" = ["dev.zed.Zed.desktop"]; - "application/text" = ["dev.zed.Zed.desktop"]; - "x-scheme-handler/http" = ["vivaldi-stable.desktop"]; - "x-scheme-handler/https" = ["vivaldi-stable.desktop"]; + "application/zip" = [ "org.gnome.FileRoller.desktop" ]; + "application/csv" = [ "calc.desktop" ]; + "application/pdf" = [ "vivaldi-stable.desktop" ]; + "application/md" = [ "dev.zed.Zed.desktop" ]; + "application/text" = [ "dev.zed.Zed.desktop" ]; + "x-scheme-handler/http" = [ "vivaldi-stable.desktop" ]; + "x-scheme-handler/https" = [ "vivaldi-stable.desktop" ]; }; }; }; - features = { - cli = { - nushell.enable = true; - fzf.enable = true; - nitch.enable = true; - secrets.enable = true; - starship.enable = true; - television.enable = true; - }; - desktop = { - crypto.enable = true; - coding.enable = true; - gaming.enable = true; - hyprland.enable = true; - media.enable = true; - obsidian.enable = true; - office.enable = true; - rofi.enable = true; - fonts.enable = true; - wayland.enable = true; - wallpapers = true; - }; - }; } - (mkIf config.features.desktop.hyprland.enable { + # Host-specific Hyprland monitor and workspace layout (dual 1440p monitors) + (mkIf config.desktop.wm.hyprland.enable { wayland.windowManager.hyprland = { enable = true; settings = { @@ -80,7 +117,6 @@ with lib; { "6, monitor:DP-2" "7, monitor:DP-2" ]; - windowrule = [ "match:class dev.zed.Zed, workspace 1" "match:class Msty, workspace 1" From 73bd2b1f2ed7ac2a3c265dadf62ecb404abed8a2 Mon Sep 17 00:00:00 2001 From: m3tm3re Date: Sun, 26 Apr 2026 11:09:50 +0200 Subject: [PATCH 04/13] fix: spec review - add missing fish module to base/shell - Create home/base/shell/fish.nix - Add to base/shell/default.nix imports - Migrate remaining hosts from features.cli.fish to base.shell.fish --- home/base/shell/default.nix | 3 +- home/base/shell/fish.nix | 117 ++++++++++++++++++++++++++++++++++ home/m3tam3re/m3-aether.nix | 5 +- home/m3tam3re/m3-ares.nix | 5 +- home/m3tam3re/m3-daedalus.nix | 5 +- home/m3tam3re/m3-helios.nix | 5 +- home/m3tam3re/m3-hermes.nix | 5 +- 7 files changed, 124 insertions(+), 21 deletions(-) create mode 100644 home/base/shell/fish.nix diff --git a/home/base/shell/default.nix b/home/base/shell/default.nix index b5b0c37..0b02d43 100644 --- a/home/base/shell/default.nix +++ b/home/base/shell/default.nix @@ -1,7 +1,8 @@ -# Shell aggregator — imports Nushell (primary) and Starship prompt. +# Shell aggregator — imports Nushell (primary), Fish, and Starship prompt. {...}: { imports = [ ./nushell.nix + ./fish.nix ./starship.nix ]; } diff --git a/home/base/shell/fish.nix b/home/base/shell/fish.nix new file mode 100644 index 0000000..94e65ec --- /dev/null +++ b/home/base/shell/fish.nix @@ -0,0 +1,117 @@ +# Fish shell configuration exposed under the new base namespace. +{ + config, + lib, + ... +}: +with lib; let + cfg = config.base.shell.fish; +in { + options.base.shell.fish.enable = mkEnableOption "enable fish shell"; + + config = mkIf cfg.enable { + programs.fish = { + enable = true; + interactiveShellInit = '' + # Fish colors using universal nix-colors palette + # Text colors + set -g fish_color_normal ${config.colorScheme.palette.base05} # text + set -g fish_color_param ${config.colorScheme.palette.base05} # text + set -g fish_color_comment ${config.colorScheme.palette.base03} # muted + set -g fish_color_autosuggestion ${config.colorScheme.palette.base03} # muted + + # Command colors + set -g fish_color_command ${config.colorScheme.palette.base0D} # accent6 (blue) + set -g fish_color_quote ${config.colorScheme.palette.base0A} # accent3 (yellow) + set -g fish_color_redirection ${config.colorScheme.palette.base0E} # accent7 (purple) + set -g fish_color_end ${config.colorScheme.palette.base08} # accent1 (red) + set -g fish_color_error ${config.colorScheme.palette.base08} # accent1 (red) + set -g fish_color_operator ${config.colorScheme.palette.base0C} # accent5 (cyan) + set -g fish_color_escape ${config.colorScheme.palette.base09} # accent2 (orange) + + # Path colors + set -g fish_color_cwd ${config.colorScheme.palette.base0B} # accent4 (green) + set -g fish_color_cwd_root ${config.colorScheme.palette.base08} # accent1 (red) + set -g fish_color_valid_path --underline + + # Interactive colors + set -g fish_color_match ${config.colorScheme.palette.base0B} # accent4 (green) + set -g fish_color_selection --background=${config.colorScheme.palette.base02} # overlay + set -g fish_color_search_match --background=${config.colorScheme.palette.base02} # overlay + set -g fish_color_history_current --bold + set -g fish_color_user ${config.colorScheme.palette.base0B} # accent4 (green) + set -g fish_color_host ${config.colorScheme.palette.base0D} # accent6 (blue) + set -g fish_color_cancel -r + + # Pager colors + set -g fish_pager_color_completion normal + set -g fish_pager_color_description ${config.colorScheme.palette.base03} # muted + set -g fish_pager_color_prefix ${config.colorScheme.palette.base0E} # accent7 (purple) + set -g fish_pager_color_progress ${config.colorScheme.palette.base0B} # accent4 (green) + ''; + loginShellInit = '' + set -x NIX_PATH nixpkgs=channel:nixos-unstable + set -x NIX_LOG info + set -x WEBKIT_DISABLE_COMPOSITING_MODE 1 + set -x TERMINAL ghostty + set -x EDITOR nvim + set -x VISUAL zed + set -x XDG_DATA_HOME $HOME/.local/share + set -x FZF_CTRL_R_OPTS " + --preview='bat --color=always -n {}' + --preview-window up:3:hidden:wrap + --bind 'ctrl-/:toggle-preview' + --bind 'ctrl-y:execute-silent(echo -n {2..} | wl-copy)+abort' + --color header:bold + --header 'Press CTRL-Y to copy command into clipboard'" + set -x FZF_DEFAULT_COMMAND fd --type f --exclude .git --follow --hidden + set -x FZF_CTRL_T_COMMAND "$FZF_DEFAULT_COMMAND" + set -x FLAKE $HOME/p/nixos/nixos-config + source /run/agenix/${config.home.username}-secrets + + if test (tty) = "/dev/tty1" + exec uwsm start -F /run/current-system/sw/bin/Hyprland + end + if test (tty) = "/dev/tty2" + exec gamescope -O HDMI-A-1 -W 1920 -H 1080 --adaptive-sync --hdr-enabled --rt --steam -- steam -pipewire-dmabuf -tenfoot + end + ''; + shellAbbrs = { + ".." = "cd .."; + "..." = "cd ../.."; + b = "yazi"; + ls = "eza"; + l = "eza -l --icons --git -a"; + lt = "eza --tree --level=2 --long --icons --git"; + grep = "rg"; + ps = "procs"; + just = "just --unstable"; + node = "bun"; + npx = "bunx"; + fs = "du -ah . | sort -hr | head -n 10"; + + n = "nix"; + nd = "nix develop -c $SHELL"; + ns = "nix shell"; + nsn = "nix shell nixpkgs#"; + nb = "nix build"; + nbn = "nix build nixpkgs#"; + nf = "nix flake"; + + nr = "sudo nixos-rebuild --flake ."; + nrs = "sudo nixos-rebuild switch --flake .#(uname -n)"; + snr = "sudo nixos-rebuild --flake ."; + snrs = "sudo nixos-rebuild --flake . switch"; + hm = "home-manager --flake ."; + hms = "home-manager --flake . switch"; + hmr = "cd ~/projects/nix-configurations; nix flake lock --update-input dotfiles; home-manager --flake .#(whoami)@(hostname) switch"; + + tsu = "sudo tailscale up"; + tsd = "sudo tailscale down"; + + vi = "nvim"; + vim = "nvim"; + }; + }; + }; +} diff --git a/home/m3tam3re/m3-aether.nix b/home/m3tam3re/m3-aether.nix index 510fbb5..a24412e 100644 --- a/home/m3tam3re/m3-aether.nix +++ b/home/m3tam3re/m3-aether.nix @@ -13,13 +13,12 @@ in { context = "server"; }) ./home-server.nix - # Fish shell — no equivalent in new base module yet - ../features/cli/fish.nix ]; # Base CLI tools (new namespace) base = { shell = { + fish.enable = true; starship.enable = true; }; cliTools = { @@ -28,6 +27,4 @@ in { }; }; - # Fish shell (legacy — no new equivalent yet) - features.cli.fish.enable = true; } diff --git a/home/m3tam3re/m3-ares.nix b/home/m3tam3re/m3-ares.nix index 9e2b0aa..ee7593a 100644 --- a/home/m3tam3re/m3-ares.nix +++ b/home/m3tam3re/m3-ares.nix @@ -15,8 +15,6 @@ with lib; { context = "desktop"; }) ./home.nix - # Fish shell — no equivalent in new base module yet - ../features/cli/fish.nix ]; config = mkMerge [ @@ -24,6 +22,7 @@ with lib; { # Base CLI tools (new namespace) base = { shell = { + fish.enable = true; nushell.enable = true; starship.enable = true; }; @@ -35,8 +34,6 @@ with lib; { secrets.enable = true; }; - # Fish shell (legacy — features namespace, no new equivalent yet) - features.cli.fish.enable = true; # Desktop features (new namespace) desktop = { diff --git a/home/m3tam3re/m3-daedalus.nix b/home/m3tam3re/m3-daedalus.nix index f97209c..3c09562 100644 --- a/home/m3tam3re/m3-daedalus.nix +++ b/home/m3tam3re/m3-daedalus.nix @@ -15,8 +15,6 @@ with lib; { context = "desktop"; }) ./home.nix - # Fish shell — no equivalent in new base module yet - ../features/cli/fish.nix ]; config = mkMerge [ @@ -24,6 +22,7 @@ with lib; { # Base CLI tools (new namespace) base = { shell = { + fish.enable = true; nushell.enable = true; starship.enable = true; }; @@ -35,8 +34,6 @@ with lib; { secrets.enable = true; }; - # Fish shell (legacy — no new equivalent yet) - features.cli.fish.enable = true; # Desktop features (new namespace) desktop = { diff --git a/home/m3tam3re/m3-helios.nix b/home/m3tam3re/m3-helios.nix index 27f6b41..17df42f 100644 --- a/home/m3tam3re/m3-helios.nix +++ b/home/m3tam3re/m3-helios.nix @@ -13,13 +13,12 @@ in { context = "server"; }) ./home-server.nix - # Fish shell — no equivalent in new base module yet - ../features/cli/fish.nix ]; # Base CLI tools (new namespace) base = { shell = { + fish.enable = true; starship.enable = true; }; cliTools = { @@ -28,6 +27,4 @@ in { }; }; - # Fish shell (legacy — no new equivalent yet) - features.cli.fish.enable = true; } diff --git a/home/m3tam3re/m3-hermes.nix b/home/m3tam3re/m3-hermes.nix index a70e6b3..e79822d 100644 --- a/home/m3tam3re/m3-hermes.nix +++ b/home/m3tam3re/m3-hermes.nix @@ -13,13 +13,12 @@ in { context = "server"; }) ./home-server.nix - # Fish shell — no equivalent in new base module yet - ../features/cli/fish.nix ]; # Base CLI tools (new namespace) base = { shell = { + fish.enable = true; starship.enable = true; }; cliTools = { @@ -28,6 +27,4 @@ in { }; }; - # Fish shell (legacy — no new equivalent yet) - features.cli.fish.enable = true; } From 797ffb2b8aec2f535ca4d297e484929720be7b8c Mon Sep 17 00:00:00 2001 From: m3tm3re Date: Sun, 26 Apr 2026 11:17:03 +0200 Subject: [PATCH 05/13] fix: assert unknown profiles in mkHomeConfig; move agent modules to coding/agents - home/lib/default.nix: add assertion for unknown profile names instead of silently filtering them out; remove unused 'inherit (lib) optional' - home/coding/agents/{opencode,pi}.nix: moved from home/features/coding/ to co-locate with agents.nix (eliminating cross-directory back-references) - home/coding/agents/agents.nix: update imports to ./opencode.nix and ./pi.nix - home/features/coding/: remove now-dead default.nix (nothing imported it) --- home/coding/agents/agents.nix | 4 +- .../coding => coding/agents}/opencode.nix | 0 .../{features/coding => coding/agents}/pi.nix | 0 home/features/coding/default.nix | 101 ------------------ home/lib/default.nix | 16 ++- 5 files changed, 16 insertions(+), 105 deletions(-) rename home/{features/coding => coding/agents}/opencode.nix (100%) rename home/{features/coding => coding/agents}/pi.nix (100%) delete mode 100644 home/features/coding/default.nix diff --git a/home/coding/agents/agents.nix b/home/coding/agents/agents.nix index 2945551..2524823 100644 --- a/home/coding/agents/agents.nix +++ b/home/coding/agents/agents.nix @@ -19,8 +19,8 @@ in { imports = [ # OpenCode and Pi agent configurations - ../../features/coding/opencode.nix - ../../features/coding/pi.nix + ./opencode.nix + ./pi.nix ]; coding.agents.skills = { diff --git a/home/features/coding/opencode.nix b/home/coding/agents/opencode.nix similarity index 100% rename from home/features/coding/opencode.nix rename to home/coding/agents/opencode.nix diff --git a/home/features/coding/pi.nix b/home/coding/agents/pi.nix similarity index 100% rename from home/features/coding/pi.nix rename to home/coding/agents/pi.nix diff --git a/home/features/coding/default.nix b/home/features/coding/default.nix deleted file mode 100644 index 3011a6b..0000000 --- a/home/features/coding/default.nix +++ /dev/null @@ -1,101 +0,0 @@ -{ - config, - inputs, - pkgs, - videoDrivers, - ... -}: let - npmGlobalPrefix = "${config.home.homeDirectory}/.npm-global"; -in { - home.file.".npmrc".text = '' - prefix=${npmGlobalPrefix} - ''; - home.sessionVariables.NPM_CONFIG_PREFIX = npmGlobalPrefix; - imports = [ - ./opencode.nix - ./pi.nix - ]; - - coding.agents.skills = { - agentsInput = inputs.agents; - externalSkills = [ - { - src = inputs.skills-anthropic; - selectSkills = ["pdf" "docx" "frontend-design"]; - } - {src = inputs.skills-vercel;} - {src = inputs.skills-basecamp;} - {src = inputs.skills-kestra;} - ]; - }; - - programs.mcp = { - enable = true; - servers = { - DeepWiki = { - url = "https://mcp.deepwiki.com/mcp"; - }; - Ref = { - command = "bash"; - args = ["-c" "REF_API_KEY=$(cat /run/agenix/ref-key) exec bunx ref-tools-mcp@latest"]; - }; - Exa = { - command = "bash"; - args = ["-c" "EXA_API_KEY=$(cat /run/agenix/exa-key) exec bunx exa-mcp-server@latest tools=web_search_exa"]; - }; - Outline = { - url = "https://wiki.az-gruppe.com/mcp"; - }; - ContextMode = { - command = "bash"; - args = ["-c" "exec bunx context-mode@latest"]; - }; - Honcho = { - command = "bash"; - args = [ - "-c" - ''exec bunx mcp-remote@latest https://mcp.honcho.dev --header "Authorization:Bearer $(cat /run/agenix/honcho-key)" --header "X-Honcho-User-Name:m3tam3re"'' - ]; - }; - }; - }; - - home.packages = with pkgs; [ - agenix-cli - agent-browser - alejandra - bc - bun - devpod - #devpod-desktop - gnumake - cmake - (python3.withPackages (ps: - with ps; [ - pip - uv - # Scientific packages - numba - numpy - torch - srt - ])) - pyrefly - nixd - nix-update - nodejs - # opencode-desktop - (qmd.override { - vulkanSupport = videoDrivers == ["amdgpu"]; - cudaSupport = videoDrivers == ["nvidia"]; - }) - openshell - openspec - pi-coding-agent - alejandra - sidecar - tailwindcss - tailwindcss-language-server - td - ]; -} diff --git a/home/lib/default.nix b/home/lib/default.nix index d527a28..adb2a77 100644 --- a/home/lib/default.nix +++ b/home/lib/default.nix @@ -11,8 +11,6 @@ { lib }: let - inherit (lib) optional; - # Infrastructure layer — nixpkgs overlays, nix-colors, m3ta-nixpkgs modules. # Always loaded on every host. commonModule = ../common; @@ -55,6 +53,12 @@ in { else if context == "server" then [ contextModuleMap.server ] else []; + # Partition profiles into known and unknown for assertion + safe import. + unknownProfiles = builtins.filter + (profileName: ! builtins.hasAttr profileName profileModuleMap) + profiles; + + # Only import known profiles; the assertion below catches unknowns. activeProfiles = builtins.filter (profileName: builtins.hasAttr profileName profileModuleMap) profiles; @@ -76,6 +80,14 @@ in { "m3ta home: context must be 'desktop', 'server', or null" + " (got: '${contextStr}')"; } + { + assertion = unknownProfiles == []; + message = + "m3ta home: unknown profiles requested:" + + " [ ${builtins.concatStringsSep " " unknownProfiles} ]." + + " Valid profiles are:" + + " [ ${builtins.concatStringsSep " " (builtins.attrNames profileModuleMap)} ]"; + } ]; }; } From d44bdad73ab18217069161ff85777d9d35252a87 Mon Sep 17 00:00:00 2001 From: m3tm3re Date: Sun, 26 Apr 2026 11:22:17 +0200 Subject: [PATCH 06/13] refactor: archive old features directory to features.old The new profile-based structure (home/base, home/desktop, home/server, home/profiles/, home/coding) is fully operational and imported via home/lib/mkHomeConfig. The legacy home/features directory is no longer referenced anywhere in the configuration. Archived rather than deleted to preserve history for reference. --- home/{features => features.old}/cli/AGENTS.md | 0 home/{features => features.old}/cli/default.nix | 0 home/{features => features.old}/cli/fish.nix | 0 home/{features => features.old}/cli/fzf.nix | 0 home/{features => features.old}/cli/nitch.nix | 0 home/{features => features.old}/cli/nushell.nix | 0 home/{features => features.old}/cli/secrets.nix | 0 home/{features => features.old}/cli/starship.nix | 0 home/{features => features.old}/cli/television.nix | 0 home/{features => features.old}/cli/zellij.nix | 0 home/{features => features.old}/desktop/AGENTS.md | 0 home/{features => features.old}/desktop/coding.nix | 0 home/{features => features.old}/desktop/crypto.nix | 0 home/{features => features.old}/desktop/default.nix | 0 home/{features => features.old}/desktop/fonts.nix | 0 home/{features => features.old}/desktop/gaming.nix | 0 home/{features => features.old}/desktop/hyprland.nix | 0 home/{features => features.old}/desktop/media.nix | 0 home/{features => features.old}/desktop/obsidian.nix | 0 home/{features => features.old}/desktop/office.nix | 0 home/{features => features.old}/desktop/rofi.nix | 0 home/{features => features.old}/desktop/theme.nix | 0 home/{features => features.old}/desktop/wallpapers.nix | 0 home/{features => features.old}/desktop/wayland.nix | 0 home/{features => features.old}/desktop/webapps.nix | 0 25 files changed, 0 insertions(+), 0 deletions(-) rename home/{features => features.old}/cli/AGENTS.md (100%) rename home/{features => features.old}/cli/default.nix (100%) rename home/{features => features.old}/cli/fish.nix (100%) rename home/{features => features.old}/cli/fzf.nix (100%) rename home/{features => features.old}/cli/nitch.nix (100%) rename home/{features => features.old}/cli/nushell.nix (100%) rename home/{features => features.old}/cli/secrets.nix (100%) rename home/{features => features.old}/cli/starship.nix (100%) rename home/{features => features.old}/cli/television.nix (100%) rename home/{features => features.old}/cli/zellij.nix (100%) rename home/{features => features.old}/desktop/AGENTS.md (100%) rename home/{features => features.old}/desktop/coding.nix (100%) rename home/{features => features.old}/desktop/crypto.nix (100%) rename home/{features => features.old}/desktop/default.nix (100%) rename home/{features => features.old}/desktop/fonts.nix (100%) rename home/{features => features.old}/desktop/gaming.nix (100%) rename home/{features => features.old}/desktop/hyprland.nix (100%) rename home/{features => features.old}/desktop/media.nix (100%) rename home/{features => features.old}/desktop/obsidian.nix (100%) rename home/{features => features.old}/desktop/office.nix (100%) rename home/{features => features.old}/desktop/rofi.nix (100%) rename home/{features => features.old}/desktop/theme.nix (100%) rename home/{features => features.old}/desktop/wallpapers.nix (100%) rename home/{features => features.old}/desktop/wayland.nix (100%) rename home/{features => features.old}/desktop/webapps.nix (100%) diff --git a/home/features/cli/AGENTS.md b/home/features.old/cli/AGENTS.md similarity index 100% rename from home/features/cli/AGENTS.md rename to home/features.old/cli/AGENTS.md diff --git a/home/features/cli/default.nix b/home/features.old/cli/default.nix similarity index 100% rename from home/features/cli/default.nix rename to home/features.old/cli/default.nix diff --git a/home/features/cli/fish.nix b/home/features.old/cli/fish.nix similarity index 100% rename from home/features/cli/fish.nix rename to home/features.old/cli/fish.nix diff --git a/home/features/cli/fzf.nix b/home/features.old/cli/fzf.nix similarity index 100% rename from home/features/cli/fzf.nix rename to home/features.old/cli/fzf.nix diff --git a/home/features/cli/nitch.nix b/home/features.old/cli/nitch.nix similarity index 100% rename from home/features/cli/nitch.nix rename to home/features.old/cli/nitch.nix diff --git a/home/features/cli/nushell.nix b/home/features.old/cli/nushell.nix similarity index 100% rename from home/features/cli/nushell.nix rename to home/features.old/cli/nushell.nix diff --git a/home/features/cli/secrets.nix b/home/features.old/cli/secrets.nix similarity index 100% rename from home/features/cli/secrets.nix rename to home/features.old/cli/secrets.nix diff --git a/home/features/cli/starship.nix b/home/features.old/cli/starship.nix similarity index 100% rename from home/features/cli/starship.nix rename to home/features.old/cli/starship.nix diff --git a/home/features/cli/television.nix b/home/features.old/cli/television.nix similarity index 100% rename from home/features/cli/television.nix rename to home/features.old/cli/television.nix diff --git a/home/features/cli/zellij.nix b/home/features.old/cli/zellij.nix similarity index 100% rename from home/features/cli/zellij.nix rename to home/features.old/cli/zellij.nix diff --git a/home/features/desktop/AGENTS.md b/home/features.old/desktop/AGENTS.md similarity index 100% rename from home/features/desktop/AGENTS.md rename to home/features.old/desktop/AGENTS.md diff --git a/home/features/desktop/coding.nix b/home/features.old/desktop/coding.nix similarity index 100% rename from home/features/desktop/coding.nix rename to home/features.old/desktop/coding.nix diff --git a/home/features/desktop/crypto.nix b/home/features.old/desktop/crypto.nix similarity index 100% rename from home/features/desktop/crypto.nix rename to home/features.old/desktop/crypto.nix diff --git a/home/features/desktop/default.nix b/home/features.old/desktop/default.nix similarity index 100% rename from home/features/desktop/default.nix rename to home/features.old/desktop/default.nix diff --git a/home/features/desktop/fonts.nix b/home/features.old/desktop/fonts.nix similarity index 100% rename from home/features/desktop/fonts.nix rename to home/features.old/desktop/fonts.nix diff --git a/home/features/desktop/gaming.nix b/home/features.old/desktop/gaming.nix similarity index 100% rename from home/features/desktop/gaming.nix rename to home/features.old/desktop/gaming.nix diff --git a/home/features/desktop/hyprland.nix b/home/features.old/desktop/hyprland.nix similarity index 100% rename from home/features/desktop/hyprland.nix rename to home/features.old/desktop/hyprland.nix diff --git a/home/features/desktop/media.nix b/home/features.old/desktop/media.nix similarity index 100% rename from home/features/desktop/media.nix rename to home/features.old/desktop/media.nix diff --git a/home/features/desktop/obsidian.nix b/home/features.old/desktop/obsidian.nix similarity index 100% rename from home/features/desktop/obsidian.nix rename to home/features.old/desktop/obsidian.nix diff --git a/home/features/desktop/office.nix b/home/features.old/desktop/office.nix similarity index 100% rename from home/features/desktop/office.nix rename to home/features.old/desktop/office.nix diff --git a/home/features/desktop/rofi.nix b/home/features.old/desktop/rofi.nix similarity index 100% rename from home/features/desktop/rofi.nix rename to home/features.old/desktop/rofi.nix diff --git a/home/features/desktop/theme.nix b/home/features.old/desktop/theme.nix similarity index 100% rename from home/features/desktop/theme.nix rename to home/features.old/desktop/theme.nix diff --git a/home/features/desktop/wallpapers.nix b/home/features.old/desktop/wallpapers.nix similarity index 100% rename from home/features/desktop/wallpapers.nix rename to home/features.old/desktop/wallpapers.nix diff --git a/home/features/desktop/wayland.nix b/home/features.old/desktop/wayland.nix similarity index 100% rename from home/features/desktop/wayland.nix rename to home/features.old/desktop/wayland.nix diff --git a/home/features/desktop/webapps.nix b/home/features.old/desktop/webapps.nix similarity index 100% rename from home/features/desktop/webapps.nix rename to home/features.old/desktop/webapps.nix From d59a6b82b64df7076bd1be5a8a70c64638329d35 Mon Sep 17 00:00:00 2001 From: m3tm3re Date: Sun, 26 Apr 2026 11:29:49 +0200 Subject: [PATCH 07/13] chore: remove features.old archive and format all files - Delete home/features.old/ (archived old flat feature modules) - All content migrated to new profile-based structure - Run alejandra formatter over 13 changed files - nix flake check passes cleanly --- home/features.old/cli/AGENTS.md | 65 ---- home/features.old/cli/default.nix | 230 ------------- home/features.old/cli/fish.nix | 116 ------- home/features.old/cli/fzf.nix | 40 --- home/features.old/cli/nitch.nix | 15 - home/features.old/cli/nushell.nix | 91 ----- home/features.old/cli/secrets.nix | 22 -- home/features.old/cli/starship.nix | 68 ---- home/features.old/cli/television.nix | 64 ---- home/features.old/cli/zellij.nix | 32 -- home/features.old/desktop/AGENTS.md | 79 ----- home/features.old/desktop/coding.nix | 23 -- home/features.old/desktop/crypto.nix | 15 - home/features.old/desktop/default.nix | 162 --------- home/features.old/desktop/fonts.nix | 24 -- home/features.old/desktop/gaming.nix | 22 -- home/features.old/desktop/hyprland.nix | 323 ------------------ home/features.old/desktop/media.nix | 55 --- home/features.old/desktop/obsidian.nix | 25 -- home/features.old/desktop/office.nix | 18 - home/features.old/desktop/rofi.nix | 206 ----------- home/features.old/desktop/theme.nix | 22 -- home/features.old/desktop/wallpapers.nix | 18 - home/features.old/desktop/wayland.nix | 29 -- home/features.old/desktop/webapps.nix | 55 --- home/lib/default.nix | 30 +- home/m3tam3re/m3-aether.nix | 11 +- home/m3tam3re/m3-ares.nix | 230 +++++++------ home/m3tam3re/m3-atlas.nix | 10 +- home/m3tam3re/m3-daedalus.nix | 216 ++++++------ home/m3tam3re/m3-helios.nix | 11 +- home/m3tam3re/m3-hermes.nix | 11 +- home/m3tam3re/m3-kratos.nix | 221 ++++++------ hosts/m3-aether/hardware-configuration.nix | 52 +-- hosts/m3-ares/services/postgres.nix | 5 +- hosts/m3-atlas/services/containers/kestra.nix | 16 +- hosts/m3-helios/hardware-configuration.nix | 52 +-- hosts/m3-hermes/hardware-configuration.nix | 8 +- 38 files changed, 430 insertions(+), 2262 deletions(-) delete mode 100644 home/features.old/cli/AGENTS.md delete mode 100644 home/features.old/cli/default.nix delete mode 100644 home/features.old/cli/fish.nix delete mode 100644 home/features.old/cli/fzf.nix delete mode 100644 home/features.old/cli/nitch.nix delete mode 100644 home/features.old/cli/nushell.nix delete mode 100644 home/features.old/cli/secrets.nix delete mode 100644 home/features.old/cli/starship.nix delete mode 100644 home/features.old/cli/television.nix delete mode 100644 home/features.old/cli/zellij.nix delete mode 100644 home/features.old/desktop/AGENTS.md delete mode 100644 home/features.old/desktop/coding.nix delete mode 100644 home/features.old/desktop/crypto.nix delete mode 100644 home/features.old/desktop/default.nix delete mode 100644 home/features.old/desktop/fonts.nix delete mode 100644 home/features.old/desktop/gaming.nix delete mode 100644 home/features.old/desktop/hyprland.nix delete mode 100644 home/features.old/desktop/media.nix delete mode 100644 home/features.old/desktop/obsidian.nix delete mode 100644 home/features.old/desktop/office.nix delete mode 100644 home/features.old/desktop/rofi.nix delete mode 100644 home/features.old/desktop/theme.nix delete mode 100644 home/features.old/desktop/wallpapers.nix delete mode 100644 home/features.old/desktop/wayland.nix delete mode 100644 home/features.old/desktop/webapps.nix diff --git a/home/features.old/cli/AGENTS.md b/home/features.old/cli/AGENTS.md deleted file mode 100644 index 24f1920..0000000 --- a/home/features.old/cli/AGENTS.md +++ /dev/null @@ -1,65 +0,0 @@ -# CLI FEATURES (home-manager) - -**Shell and terminal tooling with Fish + Nushell dual configuration** - -## OVERVIEW -8 CLI modules with integrated tooling across Fish and Nushell shells. - -## STRUCTURE -``` -cli/ -├── default.nix # Imports + shared tools (bat, eza, direnv) -├── fish.nix # Fish shell + aliases -├── fzf.nix # Fuzzy finder -├── nitch.nix # System info tool -├── nushell.nix # Nushell + aliases -├── secrets.nix # Password-store integration -├── starship.nix # Shell prompt -└── zellij.nix # Terminal multiplexer -``` - -## WHERE TO LOOK - -| Task | Location | Notes | -|------|----------|-------| -| Add CLI tool | default.nix home.packages | Check if shell integration needed | -| Shell aliases | fish.nix or nushell.nix | Kept in sync between shells | -| Prompt config | starship.nix | Uses nerd-fonts symbols | -| Secret access | secrets.nix | Agenix integration | - -## CONVENTIONS - -### Shell Integration Pattern -Tools with shell hooks enabled in both Fish and Nushell: -- **carapace**: Completions -- **zoxide**: Smart cd -- **eza**: ls replacement -- **direnv**: Directory environments -- **fzf**: Fuzzy finding - -### NixOS Rebuild Aliases (both shells) -``` -nr/nrs - nixos-rebuild [switch] -snr/snrs - sudo nixos-rebuild [switch] -hms - home-manager switch -``` - -### Bat Theme -Custom `universal` theme generated from nix-colors palette in default.nix (lines 34-157). - -### Secrets Integration -Fish/Nushell source `$HOME/.secrets` if `secrets.enable = true` (CLI secrets feature). - -## ANTI-PATTERNS - -- **DON'T** add aliases to only one shell - keep Fish/Nushell in sync -- **DON'T** use `programs.bash` - Nushell is default shell -- **DON'T** bypass carapace for completions - integrated by default - -## NOTES - -- zellij-ps custom package for project session management -- Default shell set to Nushell in hosts/common/default.nix -- Bat theme dynamically generated (no external theme files) -- lf file manager uses bat for previews -- Agenix CLI (agenix-cli) included for secret management diff --git a/home/features.old/cli/default.nix b/home/features.old/cli/default.nix deleted file mode 100644 index 3ab556e..0000000 --- a/home/features.old/cli/default.nix +++ /dev/null @@ -1,230 +0,0 @@ -{ - config, - pkgs, - videoDrivers, - ... -}: { - imports = [ - ./fish.nix - ./fzf.nix - ./nitch.nix - ./nushell.nix - ./secrets.nix - ./starship.nix - ./television.nix - ./zellij.nix - ]; - - programs.carapace = { - enable = true; - enableFishIntegration = true; - enableNushellIntegration = true; - enableBashIntegration = true; - }; - - programs.zoxide = { - enable = true; - enableFishIntegration = true; - enableNushellIntegration = true; - }; - - programs.bat = { - enable = true; - config = {theme = "universal";}; - themes = { - universal = { - src = pkgs.writeText "universal.tmTheme" '' - - - - - name - Universal (nix-colors) - settings - - - settings - - background - #${config.colorScheme.palette.base00} - foreground - #${config.colorScheme.palette.base05} - caret - #${config.colorScheme.palette.base05} - selection - #${config.colorScheme.palette.base02} - selectionForeground - #${config.colorScheme.palette.base05} - lineHighlight - #${config.colorScheme.palette.base01} - - - - name - Comment - scope - comment - settings - - foreground - #${config.colorScheme.palette.base03} - fontStyle - italic - - - - name - String - scope - string - settings - - foreground - #${config.colorScheme.palette.base0A} - - - - name - Number - scope - constant.numeric - settings - - foreground - #${config.colorScheme.palette.base0E} - - - - name - Keyword - scope - keyword - settings - - foreground - #${config.colorScheme.palette.base08} - - - - name - Function - scope - entity.name.function - settings - - foreground - #${config.colorScheme.palette.base0B} - - - - name - Type - scope - entity.name.type, storage.type - settings - - foreground - #${config.colorScheme.palette.base0D} - - - - name - Variable - scope - variable - settings - - foreground - #${config.colorScheme.palette.base05} - - - - name - Constant - scope - constant - settings - - foreground - #${config.colorScheme.palette.base0E} - - - - - - ''; - }; - }; - }; - - programs.direnv = { - enable = true; - enableNushellIntegration = true; - nix-direnv.enable = true; - }; - - programs.eza = { - enable = true; - enableFishIntegration = true; - enableBashIntegration = true; - extraOptions = ["-l" "--icons" "--git" "-a"]; - }; - - programs.lf = { - enable = true; - settings = { - preview = true; - drawbox = true; - hidden = true; - icons = true; - theme = "Dracula"; - previewer = "bat"; - }; - }; - - cli.zellij-ps = { - enable = true; - projectFolders = ["/home/m3tam3re/p"]; - }; - - home.packages = with pkgs; [ - basecamp - comma - coreutils - devenv - fabric-ai - fd - gcc - go - htop - httpie - hyprpaper-random - jq - just - lazygit - llm - lf - nix-index - nix-update - libnotify - nushellPlugins.skim - progress - ripgrep - rocmPackages.rocm-smi - rocmPackages.rocminfo - rocmPackages.rocm-runtime - sqlite - sqlite-vec - tldr - pomodoro-timer - trash-cli - unimatrix - unzip - vulkan-tools - wttrbar - wireguard-tools - yazi - zellij-ps - zip - ]; -} diff --git a/home/features.old/cli/fish.nix b/home/features.old/cli/fish.nix deleted file mode 100644 index 7d80aea..0000000 --- a/home/features.old/cli/fish.nix +++ /dev/null @@ -1,116 +0,0 @@ -{ - config, - lib, - ... -}: -with lib; let - cfg = config.features.cli.fish; -in { - options.features.cli.fish.enable = mkEnableOption "enable fish shell"; - - config = mkIf cfg.enable { - programs.fish = { - enable = true; - interactiveShellInit = '' - # Fish colors using universal nix-colors palette - # Text colors - set -g fish_color_normal ${config.colorScheme.palette.base05} # text - set -g fish_color_param ${config.colorScheme.palette.base05} # text - set -g fish_color_comment ${config.colorScheme.palette.base03} # muted - set -g fish_color_autosuggestion ${config.colorScheme.palette.base03} # muted - - # Command colors - set -g fish_color_command ${config.colorScheme.palette.base0D} # accent6 (blue) - set -g fish_color_quote ${config.colorScheme.palette.base0A} # accent3 (yellow) - set -g fish_color_redirection ${config.colorScheme.palette.base0E} # accent7 (purple) - set -g fish_color_end ${config.colorScheme.palette.base08} # accent1 (red) - set -g fish_color_error ${config.colorScheme.palette.base08} # accent1 (red) - set -g fish_color_operator ${config.colorScheme.palette.base0C} # accent5 (cyan) - set -g fish_color_escape ${config.colorScheme.palette.base09} # accent2 (orange) - - # Path colors - set -g fish_color_cwd ${config.colorScheme.palette.base0B} # accent4 (green) - set -g fish_color_cwd_root ${config.colorScheme.palette.base08} # accent1 (red) - set -g fish_color_valid_path --underline - - # Interactive colors - set -g fish_color_match ${config.colorScheme.palette.base0B} # accent4 (green) - set -g fish_color_selection --background=${config.colorScheme.palette.base02} # overlay - set -g fish_color_search_match --background=${config.colorScheme.palette.base02} # overlay - set -g fish_color_history_current --bold - set -g fish_color_user ${config.colorScheme.palette.base0B} # accent4 (green) - set -g fish_color_host ${config.colorScheme.palette.base0D} # accent6 (blue) - set -g fish_color_cancel -r - - # Pager colors - set -g fish_pager_color_completion normal - set -g fish_pager_color_description ${config.colorScheme.palette.base03} # muted - set -g fish_pager_color_prefix ${config.colorScheme.palette.base0E} # accent7 (purple) - set -g fish_pager_color_progress ${config.colorScheme.palette.base0B} # accent4 (green) - ''; - loginShellInit = '' - set -x NIX_PATH nixpkgs=channel:nixos-unstable - set -x NIX_LOG info - set -x WEBKIT_DISABLE_COMPOSITING_MODE 1 - set -x TERMINAL ghostty - set -x EDITOR nvim - set -x VISUAL zed - set -x XDG_DATA_HOME $HOME/.local/share - set -x FZF_CTRL_R_OPTS " - --preview='bat --color=always -n {}' - --preview-window up:3:hidden:wrap - --bind 'ctrl-/:toggle-preview' - --bind 'ctrl-y:execute-silent(echo -n {2..} | wl-copy)+abort' - --color header:bold - --header 'Press CTRL-Y to copy command into clipboard'" - set -x FZF_DEFAULT_COMMAND fd --type f --exclude .git --follow --hidden - set -x FZF_CTRL_T_COMMAND "$FZF_DEFAULT_COMMAND" - set -x FLAKE $HOME/p/nixos/nixos-config - source /run/agenix/${config.home.username}-secrets - - if test (tty) = "/dev/tty1" - exec uwsm start -F /run/current-system/sw/bin/Hyprland - end - if test (tty) = "/dev/tty2" - exec gamescope -O HDMI-A-1 -W 1920 -H 1080 --adaptive-sync --hdr-enabled --rt --steam -- steam -pipewire-dmabuf -tenfoot - end - ''; - shellAbbrs = { - ".." = "cd .."; - "..." = "cd ../.."; - b = "yazi"; - ls = "eza"; - l = "eza -l --icons --git -a"; - lt = "eza --tree --level=2 --long --icons --git"; - grep = "rg"; - ps = "procs"; - just = "just --unstable"; - node = "bun"; - npx = "bunx"; - fs = "du -ah . | sort -hr | head -n 10"; - - n = "nix"; - nd = "nix develop -c $SHELL"; - ns = "nix shell"; - nsn = "nix shell nixpkgs#"; - nb = "nix build"; - nbn = "nix build nixpkgs#"; - nf = "nix flake"; - - nr = "sudo nixos-rebuild --flake ."; - nrs = "sudo nixos-rebuild switch --flake .#(uname -n)"; - snr = "sudo nixos-rebuild --flake ."; - snrs = "sudo nixos-rebuild --flake . switch"; - hm = "home-manager --flake ."; - hms = "home-manager --flake . switch"; - hmr = "cd ~/projects/nix-configurations; nix flake lock --update-input dotfiles; home-manager --flake .#(whoami)@(hostname) switch"; - - tsu = "sudo tailscale up"; - tsd = "sudo tailscale down"; - - vi = "nvim"; - vim = "nvim"; - }; - }; - }; -} diff --git a/home/features.old/cli/fzf.nix b/home/features.old/cli/fzf.nix deleted file mode 100644 index ce65606..0000000 --- a/home/features.old/cli/fzf.nix +++ /dev/null @@ -1,40 +0,0 @@ -{ - config, - lib, - ... -}: -with lib; let - cfg = config.features.cli.fzf; -in { - options.features.cli.fzf.enable = mkEnableOption "enable fuzzy finder"; - - config = mkIf cfg.enable { - programs.fzf = { - enable = true; - enableFishIntegration = true; - colors = { - "fg" = "#${config.colorScheme.palette.base05}"; - "bg" = "#${config.colorScheme.palette.base00}"; - "hl" = "#${config.colorScheme.palette.base0E}"; - "fg+" = "#${config.colorScheme.palette.base05}"; - "bg+" = "#${config.colorScheme.palette.base02}"; - "hl+" = "#${config.colorScheme.palette.base0E}"; - "info" = "#${config.colorScheme.palette.base09}"; - "prompt" = "#${config.colorScheme.palette.base0B}"; - "pointer" = "#${config.colorScheme.palette.base08}"; - "marker" = "#${config.colorScheme.palette.base08}"; - "spinner" = "#${config.colorScheme.palette.base09}"; - "header" = "#${config.colorScheme.palette.base03}"; - }; - defaultOptions = [ - "--preview='bat --color=always -n {}'" - "--bind 'ctrl-/:toggle-preview'" - "--header 'Press CTRL-Y to copy command into clipboard'" - "--bind 'ctrl-/:toggle-preview'" - "--bind 'ctrl-y:execute-silent(echo -n {2..} | wl-copy)+abort'" - ]; - defaultCommand = "fd --type f --exclude .git --follow --hidden"; - changeDirWidgetCommand = "fd --type d --exclude .git --follow --hidden"; - }; - }; -} diff --git a/home/features.old/cli/nitch.nix b/home/features.old/cli/nitch.nix deleted file mode 100644 index 1177299..0000000 --- a/home/features.old/cli/nitch.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -with lib; let - cfg = config.features.cli.nitch; -in { - options.features.cli.nitch.enable = mkEnableOption "enable nitch"; - - config = mkIf cfg.enable { - home.packages = with pkgs; [nitch]; - }; -} diff --git a/home/features.old/cli/nushell.nix b/home/features.old/cli/nushell.nix deleted file mode 100644 index 16d1cba..0000000 --- a/home/features.old/cli/nushell.nix +++ /dev/null @@ -1,91 +0,0 @@ -{ - config, - lib, - ... -}: -with lib; let - cfg = config.features.cli.nushell; -in { - options.features.cli.nushell.enable = mkEnableOption "enable nushell"; - - config = mkIf cfg.enable { - programs.nushell = { - enable = true; - envFile.text = '' - $env.config.show_banner = false - $env.NIX_PATH = "nixpkgs=channel:nixos-unstable" - $env.NIX_LOG = "iunfo" - $env.WEBKIT_DISABLE_COMPOSITING_MODE = "1" - $env.TERMINAL = "ghostty" - $env.EDITOR = "nvim" - $env.VISUAL = "zeditor" - $env.FZF_DEFAULT_COMMAND = "fd --type f --exclude .git --follow --hidden" - $env.FZF_DEFAULT_OPTS = "--preview='bat --color=always -n {}' --bind 'ctrl-/:toggle-preview' --header 'Press CTRL-Y to copy command into clipboard' --bind 'ctrl-/:toggle-preview' --bind 'ctrl-y:execute-silent(echo -n {2..} | wl-copy)+abort' --color bg:#282a36,bg+:#44475a,fg:#f8f8f2,fg+:#f8f8f2,header:#6272a4,hl:#bd93f9,hl+:#bd93f9,info:#ffb86c,marker:#ff79c6,pointer:#ff79c6,prompt:#50fa7b,spinner:#ffb86c" - $env.XDG_DATA_HOME = $"($env.HOME)/.local/share" - $env.FZF_DEFAULT_COMMAND = "fd --type f --exclude .git --follow --hidden" - $env.SSH_AUTH_SOCK = "/run/user/1000/gnupg/S.gpg-agent.ssh" - $env.PATH = ($env.PATH | split row (char esep) | append $"($env.HOME)/.cache/.bun/bin" | append $"($env.HOME)/.npm-global/bin" | uniq) - $env.NPM_CONFIG_PREFIX = $"($env.HOME)/.npm-global" - $env.FLAKE = $"($env.HOME)/p/NIX/nixos-config" - - # Load kestractl-env from agenix - if ("/run/agenix/kestractl-env" | path exists) { - open /run/agenix/kestractl-env - | lines - | where {($in | str trim | str length) > 0} - | parse "{key}={value}" - | update value {str trim -c '"'} - | transpose -r -d - | load-env - } - ''; - - # if (tty) == "/dev/tty1" { - # exec uwsm start -S -F /run/current-system/sw/bin/Hyprland - # } - # if (tty) == "/dev/tty2" { - # exec gamescope -O HDMI-A-1 -W 1920 -H 1080 --adaptive-sync --hdr-enabled --rt --steam -- steam -pipewire-dmabuf -tenfoot - # } - configFile.text = '' - # Aliases - alias .. = cd .. - alias ... = cd ... - alias h = cd $env.HOME - alias b = yazi - alias lt = eza --tree --level=2 --long --icons --git - alias grep = rg - alias just = just --unstable - - alias node = bun - alias npx = bunx - - alias n = nix - alias nd = nix develop -c $nu.current-shell - alias ns = nix shell - alias nsn = nix shell nixpkgs# - alias nb = nix build - alias nbn = nix build nixpkgs# - alias nf = nix flake - - alias nr = sudo nixos-rebuild --flake . - alias nrs = sudo nixos-rebuild switch --flake .#(sys host | get hostname) - alias snr = sudo nixos-rebuild --flake . - alias snrs = sudo nixos-rebuild --flake . switch - alias hm = home-manager --flake . - alias hms = home-manager --flake . switch - alias hmr = do { cd ~/projects/nix-configurations; nix flake lock --update-input dotfiles; home-manager --flake .#(whoami)@(hostname) switch } - - alias tsu = sudo tailscale up - alias tsd = sudo tailscale down - - alias vi = nvim - alias vim = nvim - - if (which tv | is-not-empty) { - mkdir ($nu.data-dir | path join "vendor/autoload") - tv init nu | save -f ($nu.data-dir | path join "vendor/autoload/tv.nu") - } - ''; - }; - }; -} diff --git a/home/features.old/cli/secrets.nix b/home/features.old/cli/secrets.nix deleted file mode 100644 index c1848f3..0000000 --- a/home/features.old/cli/secrets.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -with lib; let - cfg = config.features.cli.secrets; -in { - options.features.cli.secrets.enable = mkEnableOption "enable secrets"; - - config = mkIf cfg.enable { - programs.password-store = { - enable = true; - package = - pkgs.pass-wayland.withExtensions - (exts: [exts.pass-otp exts.pass-import]); - settings = {PASSWORD_STORE_DIR = "$XDG_DATA_HOME/password-store";}; - }; - home.packages = with pkgs; [pinentry-gnome3]; - }; -} diff --git a/home/features.old/cli/starship.nix b/home/features.old/cli/starship.nix deleted file mode 100644 index 0861293..0000000 --- a/home/features.old/cli/starship.nix +++ /dev/null @@ -1,68 +0,0 @@ -{ - config, - lib, - ... -}: -with lib; let - cfg = config.features.cli.starship; -in { - options.features.cli.starship.enable = mkEnableOption "enable starship prompt"; - - config = mkIf cfg.enable { - programs.starship = { - enable = true; - enableFishIntegration = true; - enableNushellIntegration = true; - settings = { - format = "$all$character"; - palette = "universal"; - - palettes.universal = { - background = "#${config.colorScheme.palette.base00}"; - surface = "#${config.colorScheme.palette.base01}"; - muted = "#${config.colorScheme.palette.base03}"; - text = "#${config.colorScheme.palette.base05}"; - bright = "#${config.colorScheme.palette.base07}"; - accent1 = "#${config.colorScheme.palette.base08}"; - accent2 = "#${config.colorScheme.palette.base09}"; - accent3 = "#${config.colorScheme.palette.base0A}"; - accent4 = "#${config.colorScheme.palette.base0B}"; - accent5 = "#${config.colorScheme.palette.base0C}"; - accent6 = "#${config.colorScheme.palette.base0D}"; - accent7 = "#${config.colorScheme.palette.base0E}"; - }; - - character = { - success_symbol = "[❯](accent7)"; - error_symbol = "[❯](accent1)"; - }; - - directory = { - style = "accent6"; - truncation_length = 3; - truncate_to_repo = false; - }; - - git_branch = { - style = "accent7"; - }; - - git_status = { - style = "accent5"; - }; - - cmd_duration = { - style = "accent3"; - }; - - hostname = { - style = "accent4"; - }; - - username = { - style_user = "accent2"; - }; - }; - }; - }; -} diff --git a/home/features.old/cli/television.nix b/home/features.old/cli/television.nix deleted file mode 100644 index bc1b036..0000000 --- a/home/features.old/cli/television.nix +++ /dev/null @@ -1,64 +0,0 @@ -{ - config, - lib, - ... -}: -with lib; let - cfg = config.features.cli.television; -in { - options.features.cli.television.enable = mkEnableOption "enable nitch"; - - config = mkIf cfg.enable { - programs.television = { - enable = true; - channels = { - tldr = { - metadata = { - description = "Browse TLDR pages"; - name = "tldr"; - requirements = [ - "tldr" - ]; - }; - preview = { - command = "tldr '{}'"; - }; - source = { - command = "tldr --list"; - }; - }; - git-diff = { - metadata = { - description = "A channel to select files from git diff commands"; - name = "git-diff"; - requirements = [ - "git" - ]; - }; - preview = { - command = "git diff HEAD --color=always -- '{}'"; - }; - source = { - command = "git diff --name-only HEAD"; - }; - }; - git-log = { - metadata = { - description = "A channel to select from git log entries"; - name = "git-log"; - requirements = [ - "git" - ]; - }; - preview = { - command = "git show -p --stat --pretty=fuller --color=always '{0}'"; - }; - source = { - command = "git log --oneline --date=short --pretty=\"format:%h %s %an %cd\" \"$@\""; - output = "{split: :0}"; - }; - }; - }; - }; - }; -} diff --git a/home/features.old/cli/zellij.nix b/home/features.old/cli/zellij.nix deleted file mode 100644 index bd38e5b..0000000 --- a/home/features.old/cli/zellij.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ - config, - lib, - ... -}: -with lib; let - cfg = config.features.cli.zellij; -in { - options.features.cli.zellij.enable = mkEnableOption "enable tmux"; - - config = mkIf cfg.enable { - programs.zellij = { - enable = true; - settings = { - theme = "universal"; - themes.universal = { - bg = "#${config.colorScheme.palette.base00}"; - fg = "#${config.colorScheme.palette.base05}"; - black = "#${config.colorScheme.palette.base01}"; - red = "#${config.colorScheme.palette.base08}"; - green = "#${config.colorScheme.palette.base0B}"; - yellow = "#${config.colorScheme.palette.base0A}"; - blue = "#${config.colorScheme.palette.base0D}"; - magenta = "#${config.colorScheme.palette.base0E}"; - cyan = "#${config.colorScheme.palette.base0C}"; - white = "#${config.colorScheme.palette.base07}"; - orange = "#${config.colorScheme.palette.base09}"; - }; - }; - }; - }; -} diff --git a/home/features.old/desktop/AGENTS.md b/home/features.old/desktop/AGENTS.md deleted file mode 100644 index 1c9fbb7..0000000 --- a/home/features.old/desktop/AGENTS.md +++ /dev/null @@ -1,79 +0,0 @@ -# DESKTOP FEATURES (home-manager) - -**Wayland/Hyprland environment with color-coordinated tooling** - -## OVERVIEW -12 modular desktop features with nix-colors (Dracula) integration across all components. - -## STRUCTURE -``` -desktop/ -├── default.nix # Imports + XDG + Kitty config -├── coding.nix # Development tools (VSCode, etc.) -├── crypto.nix # Crypto wallets/tools -├── fonts.nix # Font packages -├── gaming.nix # Gaming tools/Steam -├── hyprland.nix # Hyprland WM configuration -├── media.nix # Media players/editors -├── office.nix # LibreOffice, document tools -├── rofi.nix # Application launcher -├── theme.nix # GTK/Qt theming -├── wayland.nix # Wayland utilities -└── webapps.nix # Browser-based apps -``` - -## WHERE TO LOOK - -| Task | Location | Notes | -|------|----------|-------| -| Add desktop app | Relevant feature .nix | Update home.packages | -| Configure Hyprland | hyprland.nix | Window manager settings | -| Fix colors | Check colorScheme references | Uses config.colorScheme.palette.base* | -| Add font | fonts.nix | Increases system closure size | - -## CONVENTIONS - -### Color Scheme Integration -All color-aware tools reference `config.colorScheme.palette.base00` through `base0F`: -- **base00-07**: Grayscale (dark to light) -- **base08**: Red/errors -- **base09**: Orange -- **base0A**: Yellow/strings -- **base0B**: Green/functions -- **base0C**: Cyan -- **base0D**: Blue/types -- **base0E**: Purple/constants -- **base0F**: Brown - -Template: -```nix -foreground = "#${config.colorScheme.palette.base05}"; -background = "#${config.colorScheme.palette.base00}"; -``` - -### Session Variables -Set in default.nix for Wayland/Hyprland: -```nix -NIXOS_OZONE_WL = "1"; -QT_QPA_PLATFORM = "wayland"; -XDG_CURRENT_DESKTOP = "Hyprland"; -``` - -### XDG Defaults -- **PDF**: okular -- **Text**: nvim -- **Browser**: Zen (io.github.zen_browser.zen) -- **Archive**: file-roller - -## ANTI-PATTERNS - -- **DON'T** hardcode hex colors - use colorScheme palette -- **DON'T** install fonts globally - keep in user packages -- **DON'T** bypass XDG defaults - set in mimeApps - -## NOTES - -- Kitty terminal configured in default.nix (not separate file) -- Bibata-Modern-Ice cursor theme hardcoded -- Session path includes cargo, npm-global, bun -- Desktop features are always-enabled (no feature flags in this dir) diff --git a/home/features.old/desktop/coding.nix b/home/features.old/desktop/coding.nix deleted file mode 100644 index b6a12bf..0000000 --- a/home/features.old/desktop/coding.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -with lib; let - cfg = config.features.desktop.coding; -in { - options.features.desktop.coding.enable = - mkEnableOption "install coding related stuff"; - - config = mkIf cfg.enable { - home.packages = with pkgs; [ - bruno - insomnia - ]; - coding.editors = { - neovim.enable = true; - zed.enable = true; - }; - }; -} diff --git a/home/features.old/desktop/crypto.nix b/home/features.old/desktop/crypto.nix deleted file mode 100644 index f8132b5..0000000 --- a/home/features.old/desktop/crypto.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -with lib; let - cfg = config.features.desktop.crypto; -in { - options.features.desktop.crypto.enable = mkEnableOption "Enable Crypto"; - - config = mkIf cfg.enable { - home.packages = with pkgs; [bisq2 monero-gui trezor-suite]; - }; -} diff --git a/home/features.old/desktop/default.nix b/home/features.old/desktop/default.nix deleted file mode 100644 index 33c3780..0000000 --- a/home/features.old/desktop/default.nix +++ /dev/null @@ -1,162 +0,0 @@ -{ - config, - pkgs, - ... -}: { - imports = [ - ./coding.nix - ./crypto.nix - ./fonts.nix - ./gaming.nix - ./hyprland.nix - ./media.nix - ./obsidian.nix - ./office.nix - ./rofi.nix - ./theme.nix - ./wallpapers.nix - ./wayland.nix - ./webapps.nix - ]; - - xdg = { - enable = true; - configFile."mimeapps.list".force = true; - mimeApps = { - enable = true; - associations.added = { - "application/zip" = ["org.gnome.FileRoller.desktop"]; - "application/csv" = ["calc.desktop"]; - "application/pdf" = ["okularApplication_pdf.desktop"]; - }; - defaultApplications = { - "application/zip" = ["org.gnome.FileRoller.desktop"]; - "application/csv" = ["calc.desktop"]; - "application/pdf" = ["okularApplication_pdf.desktop"]; - "application/md" = ["nvim.desktop"]; - "application/text" = ["nvim.desktop"]; - "x-scheme-handler/http" = ["io.github.zen_browser.zen"]; - "x-scheme-handler/https" = ["io.github.zen_browser.zen"]; - }; - }; - userDirs = { - enable = true; - createDirectories = true; - setSessionVariables = true; - }; - }; - - home.sessionVariables = { - WEBKIT_DISABLE_COMPOSITING_MODE = "1"; - NIXOS_OZONE_WL = "1"; - TERMINAL = "ghostty"; - QT_QPA_PLATFORM = "wayland"; - XDG_CURRENT_DESKTOP = "Hyprland"; - XDG_SESSION_TYPE = "wayland"; - XDG_SESSION_DESKTOP = "Hyprland"; - }; - home.sessionPath = ["\${XDG_BIN_HOME}" "\${HOME}/.cargo/bin" "$HOME/.npm-global/bin" "$HOME/.cache/.bun/bin"]; - - fonts.fontconfig.enable = true; - - programs.ghostty = { - enable = true; - enableFishIntegration = true; - enableBashIntegration = true; - settings = { - font-family = "Fira Code"; - copy-on-select = true; - - # Base colors from nix-colors - foreground = "#${config.colorScheme.palette.base05}"; - background = "#${config.colorScheme.palette.base00}"; - selection-foreground = "#${config.colorScheme.palette.base07}"; - selection-background = "#${config.colorScheme.palette.base02}"; - - # Cursor - cursor-color = "#${config.colorScheme.palette.base05}"; - - # Palette (16 colors) - palette = [ - "0=#${config.colorScheme.palette.base01}" - "1=#${config.colorScheme.palette.base08}" - "2=#${config.colorScheme.palette.base0B}" - "3=#${config.colorScheme.palette.base0A}" - "4=#${config.colorScheme.palette.base0D}" - "5=#${config.colorScheme.palette.base0E}" - "6=#${config.colorScheme.palette.base0C}" - "7=#${config.colorScheme.palette.base05}" - "8=#${config.colorScheme.palette.base03}" - "9=#${config.colorScheme.palette.base08}" - "10=#${config.colorScheme.palette.base0B}" - "11=#${config.colorScheme.palette.base0A}" - "12=#${config.colorScheme.palette.base0D}" - "13=#${config.colorScheme.palette.base0E}" - "14=#${config.colorScheme.palette.base0C}" - "15=#${config.colorScheme.palette.base07}" - ]; - }; - }; - - home.pointerCursor = { - gtk.enable = true; - package = pkgs.bibata-cursors; - name = "Bibata-Modern-Ice"; - size = 20; - }; - - home.packages = with pkgs; [ - appimage-run - # blueberry - bemoji - brave - # brightnessctl - # clipman - distrobox - eigent - (element-desktop.override { - commandLineArgs = "--password-store=gnome-libsecret"; - }) - launch-webapp - # eww - # firefox-devedition - file-roller - hyprpanel - seahorse - sushi - # glib - # google-chrome - # gsettings-desktop-schemas - # graphviz - ksnip - msty-studio - nwg-look - # opencode-desktop - # pamixer - # pavucontrol - # libsForQt5.qtstyleplugins - # stable.nyxt - # pcmanfm - rose-pine-hyprcursor - # qt5ct - # qt6.qtwayland - #rustdesk - # socat - # unrar - # unzip - # usbutils - # v4l-utils - remmina - slack - telegram-desktop - vivaldi - vivaldi-ffmpeg-codecs - vibetyper - # wl-clipboard - # wlogout - # wtype - # xdg-utils - # ydotool - # zip - ]; -} diff --git a/home/features.old/desktop/fonts.nix b/home/features.old/desktop/fonts.nix deleted file mode 100644 index cb69db2..0000000 --- a/home/features.old/desktop/fonts.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -with lib; let - cfg = config.features.desktop.fonts; -in { - options.features.desktop.fonts.enable = - mkEnableOption "install additional fonts for desktop apps"; - - config = mkIf cfg.enable { - home.packages = with pkgs; [ - fira-code - fira-code-symbols - nerd-fonts.fira-code - nerd-fonts.jetbrains-mono - font-manager - font-awesome_5 - noto-fonts - ]; - }; -} diff --git a/home/features.old/desktop/gaming.nix b/home/features.old/desktop/gaming.nix deleted file mode 100644 index 6cc7414..0000000 --- a/home/features.old/desktop/gaming.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -with lib; let - cfg = config.features.desktop.gaming; -in { - options.features.desktop.gaming.enable = - mkEnableOption "install gaming related stuff"; - - config = mkIf cfg.enable { - home.packages = with pkgs; [ - gamescope - gamemode - goverlay - mangohud - protonplus - ]; - }; -} diff --git a/home/features.old/desktop/hyprland.nix b/home/features.old/desktop/hyprland.nix deleted file mode 100644 index 090c809..0000000 --- a/home/features.old/desktop/hyprland.nix +++ /dev/null @@ -1,323 +0,0 @@ -{ - config, - lib, - ... -}: -with lib; let - cfg = config.features.desktop.hyprland; -in { - options.features.desktop.hyprland.enable = - mkEnableOption "Hyprland related stuff"; - - config = mkIf cfg.enable { - wayland.windowManager.hyprland = { - settings = { - xwayland = { - force_zero_scaling = true; - }; - - exec-once = [ - "hyprpanel" - "while ! hyprpaper-random; do sleep 0.5; done" - "wl-paste --type text --watch cliphist store" # Stores only text data - "wl-paste --type image --watch cliphist store" # Stores only image data "wl-paste -p -t text --watch clipman store -P --histpath=\"~/.local/share/clipman-primary.json\"" - "vibetyper" - ]; - - env = [ - "XCURSOR_SIZE,32" - "HYPRCURSOR_THEME,Bibata-Modern-Ice" - "WLR_NO_HARDWARE_CURSORS,1" - "GTK_THEME,Dracula" - "XDG_CURRENT_DESKTOP,Hyprland" - "XDG_SESSION_TYPE,wayland" - "XDG_SESSION_DESKTOP,Hyprland" - "XKB_DEFAULT_LAYOUT,de" - "NIXOS_OZONE_WL,1" - ]; - - input = { - kb_layout = "de,us"; - kb_variant = ""; - kb_model = ""; - kb_rules = ""; - kb_options = "ctrl:nocaps"; - follow_mouse = 1; - }; - - general = { - gaps_in = 5; - gaps_out = 5; - border_size = 1; - # Keeping the existing active border as requested - "col.active_border" = "rgba(9742b5ee) rgba(9742b5ee) 45deg"; - "col.inactive_border" = "rgba(${config.colorScheme.palette.base03}aa)"; - layout = "dwindle"; - }; - - decoration = { - shadow = { - enabled = true; - range = 60; - render_power = 3; - color = "rgba(${config.colorScheme.palette.base00}66)"; - offset = "1 2"; - scale = 0.97; - }; - rounding = 8; - blur = { - enabled = true; - size = 3; - passes = 3; - }; - active_opacity = 0.9; - inactive_opacity = 0.5; - }; - - animations = { - enabled = true; - bezier = "myBezier, 0.05, 0.9, 0.1, 1.05"; - animation = [ - "windows, 1, 7, myBezier" - "windowsOut, 1, 7, default, popin 80%" - "border, 1, 10, default" - "borderangle, 1, 8, default" - "fade, 1, 7, default" - "workspaces, 1, 6, default" - ]; - }; - - dwindle = { - pseudotile = true; - preserve_split = true; - }; - - master = { - new_status = "master"; - }; - - device = [ - { - name = "epic-mouse-v1"; - sensitivity = -0.5; - } - { - name = "zsa-technology-labs-moonlander-mark-i"; - kb_layout = "us"; - } - { - name = "keychron-keychron-k7"; - kb_layout = "us"; - } - ]; - windowrule = [ - # Floating dialogs - "match:class file_progress, float on" - "match:class confirm, float on" - "match:class dialog, float on" - "match:class download, float on" - "match:class notification, float on" - "match:class error, float on" - "match:class splash, float on" - "match:class confirmreset, float on" - "match:title Open File, float on" - "match:title branchdialog, float on" - "match:class pavucontrol-qt, float on" - "match:class pavucontrol, float on" - "match:class class:^(espanso)$, float on" - # wlogout - "match:class wlogout, fullscreen on" - "match:title wlogout, float on" - "match:title wlogout, fullscreen on" - # mpv - "match:class mpv, float on" - "match:class mpv, idle_inhibit focus" - "match:class mpv, opacity 1.0 override" - # Media/Volume/PiP - "match:title ^(Media viewer)$, float on" - "match:title ^(Volume Control)$, float on" - "match:title ^(Picture-in-Picture)$, float on" - # Pomodoro timer - "match:title ^(floating-pomodoro)$, float on" - "match:title ^(floating-pomodoro)$, size 250 50" - "match:title ^(floating-pomodoro)$, move 12 (monitor_h-150)" - "match:title ^(floating-pomodoro)$, pin on" - # Streamlabs overlays - "match:initial_title .*streamlabs.com.*, float on" - "match:initial_title .*streamlabs.com.*, pin on" - "match:initial_title .*streamlabs.com.*, size 800 400" - "match:initial_title .*alert-box.*, move 100%-820 102" - "match:initial_title .*chat-box.*, move 100%-820 512" - "match:initial_title .*streamlabs.com.*, opacity 0.5 override" - "match:initial_title .*streamlabs.com.*, idle_inhibit focus" - "match:initial_title .*streamlabs.com.*, no_anim on" - "match:initial_title .*streamlabs.com.*, decorate off" - "match:initial_title .*streamlabs.com.*, no_shadow on" - "match:initial_title .*streamlabs.com.*, no_blur on" - # Vibetyper recording indicator - "match:class ^vibe-typer$, match:title ^Recording Indicator$, no_blur on" - "border_color rgb(ffffff), match:xwayland 1" - ]; - "$mainMod" = "SUPER"; - "$terminal" = "ghostty"; - - bind = [ - "$mainMod, return, exec, $terminal nu -c zellij-ps" - # "$mainMod, t, exec, warp-terminal" - "$mainMod, t, exec, $terminal -e nu -c 'nitch; exec nu'" - "$mainMod SHIFT, t, exec, launch-timer" - "$mainMod, n, exec, $terminal -e nvim" - "$mainMod, z, exec, uwsm app -- zeditor" - "$mainMod, o, exec, hyprctl dispatch setprop activewindow opaque toggle" - "$mainMod, r, exec, hyprctl dispatch focuswindow \"initialtitle:.*alert-box.*\" && hyprctl dispatch moveactive exact 4300 102 && hyprctl dispatch focuswindow \"initialtitle:.*chat-box.*\" && hyprctl dispatch moveactive exact 4300 512" - "$mainMod, b, exec, uwsm app -- thunar" - "$mainMod SHIFT, B, exec, uwsm app -- vivaldi" - "$mainMod, Escape, exec, uwsm app -- wlogout -p layer-shell" - "$mainMod, Space, togglefloating" - "$mainMod, q, killactive" - "$mainMod, M, exit" - "$mainMod, F, fullscreen" - "$mainMod SHIFT, V, togglefloating" - "$mainMod, D, exec, uwsm app -- rofi -show drun -run-command \"uwsm app -- {cmd}\"" - "$mainMod, V, exec, uwsm app -- cliphist list | rofi -dmenu | cliphist decode | wl-copy" - "$mainMod, C, exec, bash -c 'FILE=/tmp/screenshot_$(date +%s).png; grim -g \"$(slurp)\" \"$FILE\" && ksnip \"$FILE\"'" - "$mainMod SHIFT, S, exec, uwsm app -- rofi -show emoji" - "$mainMod, P, exec, uwsm app -- rofi-pass" - "$mainMod SHIFT, P, pseudo" - "$mainMod, R, exec, stt-ptt start" - "$mainMod, S, exec, stt-ptt start" - "$mainMod, J, togglesplit" - "$mainMod, h, movefocus, l" - "$mainMod, l, movefocus, r" - "$mainMod, k, movefocus, u" - "$mainMod, j, movefocus, d" - "$mainMod, 1, workspace, 1" - "$mainMod, 2, workspace, 2" - "$mainMod, 3, workspace, 3" - "$mainMod, 4, workspace, 4" - "$mainMod, 5, workspace, 5" - "$mainMod, 6, workspace, 6" - "$mainMod, 7, workspace, 7" - "$mainMod, 8, workspace, 8" - "$mainMod, 9, workspace, 9" - "$mainMod, 0, workspace, 10" - "$mainMod SHIFT, 1, movetoworkspace, 1" - "$mainMod SHIFT, 2, movetoworkspace, 2" - "$mainMod SHIFT, 3, movetoworkspace, 3" - "$mainMod SHIFT, 4, movetoworkspace, 4" - "$mainMod SHIFT, 5, movetoworkspace, 5" - "$mainMod SHIFT, 6, movetoworkspace, 6" - "$mainMod SHIFT, 7, movetoworkspace, 7" - "$mainMod SHIFT, 8, movetoworkspace, 8" - "$mainMod SHIFT, 9, movetoworkspace, 9" - "$mainMod SHIFT, 0, movetoworkspace, 10" - "$mainMod, mouse_down, workspace, e+1" - "$mainMod, mouse_up, workspace, e-1" - ]; - bindr = [ - "$mainMod, R, exec, stt-ptt stop" - "$mainMod, S, exec, stt-ptt format-stop" - ]; - bindm = [ - "$mainMod, mouse:272, movewindow" - "$mainMod, mouse:273, resizewindow" - ]; - }; - }; - services.hypridle = { - enable = true; - settings = { - general = { - before_sleep_cmd = "hyprlock"; - after_sleep_cmd = "hyprctl dispatch dpms on"; - inhibit_sleep = 3; - }; - - listener = [ - { - timeout = 300; # 5 min - on-timeout = "hyprlock"; - } - { - timeout = 420; # 5.5 min - on-timeout = "hyprctl dispatch dpms off"; - on-resume = "hyprctl dispatch dpms on"; - } - ]; - }; - }; - - services.hyprpaper.enable = true; - - programs.hyprlock = { - enable = true; - settings = { - "$font" = "JetBrainsMono Nerd Font"; - "$base" = "rgb(${config.colorScheme.palette.base00})"; - "$text" = "rgb(${config.colorScheme.palette.base05})"; - "$textAlpha" = "${config.colorScheme.palette.base05}"; - "$accentAlpha" = "${config.colorScheme.palette.base0D}"; - "$red" = "rgb(${config.colorScheme.palette.base08})"; - "$yellow" = "rgb(${config.colorScheme.palette.base0A})"; - - general = { - hide_cursor = true; - }; - - background = { - monitor = ""; - path = "${config.home.homeDirectory}/.config/hypr/wallpapers/wallhaven-lmmo8r.jpg"; - blur_passes = 0; - color = "rgb(${config.colorScheme.palette.base00})"; - }; - - label = [ - { - monitor = ""; - text = "$TIME"; - color = "$text"; - font_size = 90; - font_family = "$font"; - position = "30, 0"; - halign = "left"; - valign = "top"; - } - { - monitor = ""; - text = ''cmd[update:43200000] echo "$(date +"%A, %d %B %Y")"''; - color = "$text"; - font_size = 25; - font_family = "$font"; - position = "30, -150"; - halign = "left"; - valign = "top"; - } - ]; - - input-field = [ - { - monitor = ""; - size = "300, 60"; - outline_thickness = 4; - dots_size = 0.2; - dots_spacing = 0.2; - dots_center = true; - outer_color = "rgb(${config.colorScheme.palette.base0D})"; - inner_color = "rgb(${config.colorScheme.palette.base00})"; - font_color = "rgb(${config.colorScheme.palette.base05})"; - fade_on_empty = false; - placeholder_text = ''󰌾 Logged in as $USER''; - hide_input = false; - check_color = "rgb(${config.colorScheme.palette.base0D})"; - fail_color = "rgb(${config.colorScheme.palette.base08})"; - fail_text = ''$FAIL ($ATTEMPTS)''; - capslock_color = "rgb(${config.colorScheme.palette.base0A})"; - position = "0, -35"; - halign = "center"; - valign = "center"; - } - ]; - }; - }; - }; -} diff --git a/home/features.old/desktop/media.nix b/home/features.old/desktop/media.nix deleted file mode 100644 index 39f4d01..0000000 --- a/home/features.old/desktop/media.nix +++ /dev/null @@ -1,55 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -with lib; let - cfg = config.features.desktop.media; -in { - options.features.desktop.media.enable = - mkEnableOption "enable media features"; - - config = mkIf cfg.enable { - home.packages = with pkgs; [ - # handbrake - # kdePackages.kdenlive - # makemkv - # mediainfo - amf - ffmpeg_6-full - gimp - gst_all_1.gstreamer - gst_all_1.gst-vaapi - handbrake - inkscape - kdePackages.kdenlive - libation - #makemkv - pamixer - pavucontrol - qpwgraph - v4l-utils - plexamp - # uxplay - # vlc - webcord - # yt-dlp - unimatrix - ]; - - programs = { - mpv = { - enable = true; - bindings = { - WHEEL_UP = "seek 10"; - WHEEL_DOWN = "seek -10"; - }; - config = { - profile = "gpu-hq"; - ytdl-format = "bestvideo+bestaudio"; - }; - }; - }; - }; -} diff --git a/home/features.old/desktop/obsidian.nix b/home/features.old/desktop/obsidian.nix deleted file mode 100644 index c03b766..0000000 --- a/home/features.old/desktop/obsidian.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - config, - lib, - ... -}: -with lib; let - cfg = config.features.desktop.obsidian; -in { - options.features.desktop.obsidian.enable = - mkEnableOption "enable Obsidian knowledge base"; - - config = mkIf cfg.enable { - programs.obsidian.enable = true; - - xdg.mimeApps = { - enable = true; - associations.added = { - "text/markdown" = ["obsidian.desktop"]; - }; - defaultApplications = { - "text/markdown" = ["obsidian.desktop"]; - }; - }; - }; -} diff --git a/home/features.old/desktop/office.nix b/home/features.old/desktop/office.nix deleted file mode 100644 index 0eddd32..0000000 --- a/home/features.old/desktop/office.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -with lib; let - cfg = config.features.desktop.office; -in { - options.features.desktop.office.enable = - mkEnableOption "install office and paperwork stuff"; - - config = mkIf cfg.enable { - home.packages = with pkgs; [ - libreoffice-fresh - ]; - }; -} diff --git a/home/features.old/desktop/rofi.nix b/home/features.old/desktop/rofi.nix deleted file mode 100644 index e17c9a6..0000000 --- a/home/features.old/desktop/rofi.nix +++ /dev/null @@ -1,206 +0,0 @@ -{ - config, - pkgs, - lib, - ... -}: -with lib; let - cfg = config.features.desktop.rofi; -in { - options.features.desktop.rofi.enable = mkEnableOption "enable rofi"; - - config = mkIf cfg.enable { - programs.rofi = with pkgs; { - enable = true; - package = rofi.override { - plugins = [ - rofi-calc - rofi-emoji - stable.rofi-file-browser - ]; - }; - pass = { - enable = true; - package = rofi-pass-wayland; - }; - terminal = "${pkgs.ghostty}/bin/ghostty"; - font = "Fira Code"; - extraConfig = { - show-icons = true; - disable-history = false; - modi = "drun,calc,emoji,filebrowser"; - kb-primary-paste = "Control+V,Shift+Insert"; - kb-secondary-paste = "Control+v,Insert"; - }; - theme = let - inherit (config.colorScheme) palette; - in - builtins.toString (pkgs.writeText "rofi-universal-theme.rasi" '' - * { - /* Universal theme colors from nix-colors */ - background: #${palette.base00}; - surface: #${palette.base01}; - overlay: #${palette.base02}; - muted: #${palette.base03}; - subtle: #${palette.base04}; - text: #${palette.base05}; - bright-text: #${palette.base06}; - highlight: #${palette.base07}; - accent1: #${palette.base08}; - accent2: #${palette.base09}; - accent3: #${palette.base0A}; - accent4: #${palette.base0B}; - accent5: #${palette.base0C}; - accent6: #${palette.base0D}; - accent7: #${palette.base0E}; - accent8: #${palette.base0F}; - - /* Global properties */ - background-color: @background; - text-color: @text; - font: "Fira Code 12"; - border: 0; - margin: 0; - padding: 0; - spacing: 0; - } - - window { - background-color: @background; - border: 1px; - border-color: @accent7; - border-radius: 6px; - width: 40%; - padding: 16px; - } - - inputbar { - children: [ prompt, entry ]; - spacing: 12px; - padding: 8px; - border-radius: 4px; - background-color: @surface; - } - - prompt { - text-color: @accent7; - background-color: transparent; - } - - entry { - placeholder: "Search..."; - placeholder-color: @subtle; - text-color: @text; - background-color: transparent; - cursor-color: @accent7; - } - - message { - background-color: @surface; - border-radius: 4px; - padding: 8px; - margin: 8px 0; - } - - textbox { - text-color: @text; - background-color: transparent; - } - - listview { - background-color: transparent; - margin: 8px 0 0; - lines: 10; - columns: 1; - fixed-height: true; - scrollbar: false; - } - - element { - background-color: transparent; - text-color: @text; - padding: 8px; - border-radius: 4px; - spacing: 8px; - } - - element normal.normal { - background-color: transparent; - text-color: @text; - } - - element selected.normal { - background-color: @accent7; - text-color: @background; - } - - element alternate.normal { - background-color: transparent; - text-color: @text; - } - - element-icon { - background-color: transparent; - size: 24px; - } - - element-text { - background-color: transparent; - text-color: inherit; - vertical-align: 0.5; - } - - mode-switcher { - spacing: 0; - background-color: @surface; - border-radius: 4px; - margin: 8px 0 0; - } - - button { - padding: 8px 16px; - background-color: transparent; - text-color: @text; - border-radius: 4px; - } - - button selected { - background-color: @accent7; - text-color: @background; - } - - /* Scrollbar */ - scrollbar { - width: 4px; - border: 0; - handle-color: @accent7; - handle-width: 4px; - padding: 0; - } - ''); - }; - cli.rofi-project-opener = { - enable = true; - projectDirs = { - AI = { - path = "~/p/AI"; - args = ""; - }; - CHAT = { - path = "~/p/CHAT"; - args = "--agent chiron"; - }; - MISC = { - path = "~/p/MISC"; - args = "--agent chiron-forge"; - }; - NIX = { - path = "~/p/NIX"; - args = ""; - }; - }; - terminal = pkgs.ghostty; - terminalCommand = "opencode %a"; - }; - }; -} diff --git a/home/features.old/desktop/theme.nix b/home/features.old/desktop/theme.nix deleted file mode 100644 index ee2aa17..0000000 --- a/home/features.old/desktop/theme.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ - config, - pkgs, - ... -}: { - qt = { - enable = true; - platformTheme.name = "gtk"; - }; - gtk = { - enable = true; - theme = { - name = "Dracula"; - package = pkgs.dracula-theme; - }; - iconTheme = { - name = "Dracula"; - package = pkgs.dracula-icon-theme; - }; - gtk4.theme = config.gtk.theme; - }; -} diff --git a/home/features.old/desktop/wallpapers.nix b/home/features.old/desktop/wallpapers.nix deleted file mode 100644 index fbc6a27..0000000 --- a/home/features.old/desktop/wallpapers.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -with lib; let - cfg = config.features.desktop.wallpapers; -in { - options.features.desktop.wallpapers = mkEnableOption "Wallpapers for Hyprland"; - - config = mkIf cfg { - xdg.configFile."hypr/wallpapers" = { - source = ../../m3tam3re/wallpapers; - recursive = true; - }; - }; -} diff --git a/home/features.old/desktop/wayland.nix b/home/features.old/desktop/wayland.nix deleted file mode 100644 index 506b182..0000000 --- a/home/features.old/desktop/wayland.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -with lib; let - cfg = config.features.desktop.wayland; -in { - options.features.desktop.wayland.enable = mkEnableOption "wayland extra tools and config"; - - config = mkIf cfg.enable { - home.packages = with pkgs; [ - grim - hyprcursor - hyprlock - hyprpaper - qt6.qtwayland - slurp - waypipe - wl-clipboard - wf-recorder - wl-mirror - wlogout - wtype - ydotool - ]; - }; -} diff --git a/home/features.old/desktop/webapps.nix b/home/features.old/desktop/webapps.nix deleted file mode 100644 index 57ed3fc..0000000 --- a/home/features.old/desktop/webapps.nix +++ /dev/null @@ -1,55 +0,0 @@ -{ - pkgs, - lib, - ... -}: let - icons = { - teams = pkgs.fetchurl { - url = "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/microsoft-teams.svg"; - sha256 = "sha256-Pr9QS8nnXJq97r4/G3c6JXi34zxHl0ps9gcyI8cN/s8="; - }; - outlook = pkgs.fetchurl { - url = "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/microsoft-outlook.svg"; - sha256 = "sha256-3u8t5QNHFZvrAegxBiGicO4PjtMWhEaQSCv7MSSfLLc="; - }; - opencode = pkgs.fetchurl { - url = "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/opencode-dark.svg"; - sha256 = "1lms4f8habamvdh2qqqz9psx4py9wx23mmlkkds44pvrbq3bkj3n"; - }; - }; -in { - xdg.desktopEntries = { - teams = { - name = "Microsoft Teams"; - exec = "launch-webapp https://teams.microsoft.com"; - comment = "Open Microsoft Teams as a Desktop App"; - categories = ["Application" "Network" "Chat"]; - terminal = false; - icon = icons.teams; - }; - outlook = { - name = "Microsoft Outlook"; - exec = "launch-webapp https://outlook.office.com/mail/"; - comment = "Open Microsoft Outlook as a Desktop App"; - categories = ["Application" "Network"]; - terminal = false; - icon = icons.outlook; - }; - basecamp = { - name = "Basecamp"; - exec = "launch-webapp https://3.basecamp.com/5996442/"; - comment = "Open Basecamp as a Desktop App"; - categories = ["Application" "Network"]; - terminal = false; - icon = "/home/sascha.koenig/.local/share/icons/basecamp-logo.png"; - }; - opencode = { - name = "Opencode"; - exec = "rofi-project-opener"; - comment = "Open Opencode Terminal App"; - categories = ["Application" "Development"]; - terminal = false; - icon = icons.opencode; - }; - }; -} diff --git a/home/lib/default.nix b/home/lib/default.nix index adb2a77..6fb9798 100644 --- a/home/lib/default.nix +++ b/home/lib/default.nix @@ -8,9 +8,7 @@ # (homeLib.mkHomeConfig { profiles = ["coding" "gaming"]; context = "desktop"; }) # ]; # } -{ lib }: - -let +{lib}: let # Infrastructure layer — nixpkgs overlays, nix-colors, m3ta-nixpkgs modules. # Always loaded on every host. commonModule = ../common; @@ -31,7 +29,6 @@ let gaming = ../profiles/gaming; media = ../profiles/media; }; - in { # Generate a home-manager module with imports based on profiles and context. # @@ -46,36 +43,41 @@ in { mkHomeConfig = { profiles ? [], context ? null, - }: - let + }: let contextImport = - if context == "desktop" then [ contextModuleMap.desktop ] - else if context == "server" then [ contextModuleMap.server ] + if context == "desktop" + then [contextModuleMap.desktop] + else if context == "server" + then [contextModuleMap.server] else []; # Partition profiles into known and unknown for assertion + safe import. - unknownProfiles = builtins.filter + unknownProfiles = + builtins.filter (profileName: ! builtins.hasAttr profileName profileModuleMap) profiles; # Only import known profiles; the assertion below catches unknowns. - activeProfiles = builtins.filter + activeProfiles = + builtins.filter (profileName: builtins.hasAttr profileName profileModuleMap) profiles; profileImports = map (profileName: profileModuleMap.${profileName}) activeProfiles; - contextStr = if context == null then "null" else context; - + contextStr = + if context == null + then "null" + else context; in { imports = - [ commonModule baseModule ] + [commonModule baseModule] ++ contextImport ++ profileImports; assertions = [ { - assertion = builtins.elem context [ "desktop" "server" null ]; + assertion = builtins.elem context ["desktop" "server" null]; message = "m3ta home: context must be 'desktop', 'server', or null" + " (got: '${contextStr}')"; diff --git a/home/m3tam3re/m3-aether.nix b/home/m3tam3re/m3-aether.nix index a24412e..fac6499 100644 --- a/home/m3tam3re/m3-aether.nix +++ b/home/m3tam3re/m3-aether.nix @@ -1,15 +1,11 @@ # m3-aether — cloud VM. # Context: server | Profiles: (none) -{ - lib, - ... -}: -let - homeLib = import ../lib { inherit lib; }; +{lib, ...}: let + homeLib = import ../lib {inherit lib;}; in { imports = [ (homeLib.mkHomeConfig { - profiles = [ ]; + profiles = []; context = "server"; }) ./home-server.nix @@ -26,5 +22,4 @@ in { nitch.enable = true; }; }; - } diff --git a/home/m3tam3re/m3-ares.nix b/home/m3tam3re/m3-ares.nix index ee7593a..4cdfb3b 100644 --- a/home/m3tam3re/m3-ares.nix +++ b/home/m3tam3re/m3-ares.nix @@ -4,133 +4,131 @@ config, lib, ... -}: -let - homeLib = import ../lib { inherit lib; }; +}: let + homeLib = import ../lib {inherit lib;}; in -with lib; { - imports = [ - (homeLib.mkHomeConfig { - profiles = [ "coding" "gaming" "media" ]; - context = "desktop"; - }) - ./home.nix - ]; + with lib; { + imports = [ + (homeLib.mkHomeConfig { + profiles = ["coding" "gaming" "media"]; + context = "desktop"; + }) + ./home.nix + ]; - config = mkMerge [ - { - # Base CLI tools (new namespace) - base = { - shell = { - fish.enable = true; - nushell.enable = true; - starship.enable = true; + config = mkMerge [ + { + # Base CLI tools (new namespace) + base = { + shell = { + fish.enable = true; + nushell.enable = true; + starship.enable = true; + }; + cliTools = { + fzf.enable = true; + nitch.enable = true; + television.enable = true; + }; + secrets.enable = true; }; - cliTools = { - fzf.enable = true; - nitch.enable = true; - television.enable = true; + + # Desktop features (new namespace) + desktop = { + wm = { + hyprland.enable = true; + rofi.enable = true; + wayland.enable = true; + }; + apps = { + crypto.enable = true; + obsidian.enable = true; + office.enable = true; + }; + theme = { + fonts.enable = true; + wallpapers.enable = true; + }; }; - secrets.enable = true; - }; - - # Desktop features (new namespace) - desktop = { - wm = { - hyprland.enable = true; - rofi.enable = true; - wayland.enable = true; + # Coding environment + coding = { + editors = { + neovim.enable = true; + zed.enable = true; + }; + lsp.enable = true; }; - apps = { - crypto.enable = true; - obsidian.enable = true; - office.enable = true; + + # Gaming profile features + profiles.gaming = { + steam.enable = true; + gamescope.enable = true; }; - theme = { - fonts.enable = true; - wallpapers.enable = true; + + # Media profile features + profiles.media = { + obs.enable = true; + ffmpeg.enable = true; + kdenlive.enable = true; + ytDlp.enable = true; }; - }; - # Coding environment - coding = { - editors = { - neovim.enable = true; - zed.enable = true; - }; - lsp.enable = true; - }; - - # Gaming profile features - profiles.gaming = { - steam.enable = true; - gamescope.enable = true; - }; - - # Media profile features - profiles.media = { - obs.enable = true; - ffmpeg.enable = true; - kdenlive.enable = true; - ytDlp.enable = true; - }; - - xdg = { - enable = true; - configFile."mimeapps.list".force = true; - mimeApps = { + xdg = { enable = true; - associations.added = { - "application/zip" = [ "org.gnome.FileRoller.desktop" ]; - "application/csv" = [ "calc.desktop" ]; - "application/pdf" = [ "vivaldi-stable.desktop" ]; - "x-scheme-handler/http" = [ "vivaldi-stable.desktop" ]; - "x-scheme-handler/https" = [ "vivaldi-stable.desktop" ]; - }; - defaultApplications = { - "application/zip" = [ "org.gnome.FileRoller.desktop" ]; - "application/csv" = [ "calc.desktop" ]; - "application/pdf" = [ "vivaldi-stable.desktop" ]; - "application/md" = [ "dev.zed.Zed.desktop" ]; - "application/text" = [ "dev.zed.Zed.desktop" ]; - "x-scheme-handler/http" = [ "vivaldi-stable.desktop" ]; - "x-scheme-handler/https" = [ "vivaldi-stable.desktop" ]; + configFile."mimeapps.list".force = true; + mimeApps = { + enable = true; + associations.added = { + "application/zip" = ["org.gnome.FileRoller.desktop"]; + "application/csv" = ["calc.desktop"]; + "application/pdf" = ["vivaldi-stable.desktop"]; + "x-scheme-handler/http" = ["vivaldi-stable.desktop"]; + "x-scheme-handler/https" = ["vivaldi-stable.desktop"]; + }; + defaultApplications = { + "application/zip" = ["org.gnome.FileRoller.desktop"]; + "application/csv" = ["calc.desktop"]; + "application/pdf" = ["vivaldi-stable.desktop"]; + "application/md" = ["dev.zed.Zed.desktop"]; + "application/text" = ["dev.zed.Zed.desktop"]; + "x-scheme-handler/http" = ["vivaldi-stable.desktop"]; + "x-scheme-handler/https" = ["vivaldi-stable.desktop"]; + }; }; }; - }; - } + } - # Host-specific Hyprland monitor and workspace layout - (mkIf config.desktop.wm.hyprland.enable { - wayland.windowManager.hyprland = { - enable = true; - settings = { - exec-once = [ "tuxedo-backlight" ]; - monitor = [ - "eDP-1,preferred,0x0,1.25" - "HDMI-A-1,1920x1080@120,2560x0,1" - ]; - workspace = [ - "1, monitor:eDP-1, default:true" - "2, monitor:eDP-1" - "3, monitor:eDP-1" - "4, monitor:HDMI-A-1," - "5, monitor:HDMI-A-1,border:false,rounding:false" - "6, monitor:HDMI-A-1" - ]; - windowrule = [ - "match:class dev.zed.Zed, workspace 1" - "match:class Msty, workspace 1" - "match:class ^(com.obsproject.Studio)$, workspace 2" - "match:class ^(brave-browser)$, workspace 4, opacity 1.0" - "match:class ^(vivaldi-stable)$, workspace 4, opacity 1.0" - "match:class ^steam_app_\\d+$, fullscreen on" - "match:class ^steam_app_\\d+$, workspace 5" - "match:class ^steam_app_\\d+$, idle_inhibit focus" - ]; + # Host-specific Hyprland monitor and workspace layout + (mkIf config.desktop.wm.hyprland.enable { + wayland.windowManager.hyprland = { + enable = true; + settings = { + exec-once = ["tuxedo-backlight"]; + monitor = [ + "eDP-1,preferred,0x0,1.25" + "HDMI-A-1,1920x1080@120,2560x0,1" + ]; + workspace = [ + "1, monitor:eDP-1, default:true" + "2, monitor:eDP-1" + "3, monitor:eDP-1" + "4, monitor:HDMI-A-1," + "5, monitor:HDMI-A-1,border:false,rounding:false" + "6, monitor:HDMI-A-1" + ]; + windowrule = [ + "match:class dev.zed.Zed, workspace 1" + "match:class Msty, workspace 1" + "match:class ^(com.obsproject.Studio)$, workspace 2" + "match:class ^(brave-browser)$, workspace 4, opacity 1.0" + "match:class ^(vivaldi-stable)$, workspace 4, opacity 1.0" + "match:class ^steam_app_\\d+$, fullscreen on" + "match:class ^steam_app_\\d+$, workspace 5" + "match:class ^steam_app_\\d+$, idle_inhibit focus" + ]; + }; }; - }; - }) - ]; -} + }) + ]; + } diff --git a/home/m3tam3re/m3-atlas.nix b/home/m3tam3re/m3-atlas.nix index 161798f..248fe23 100644 --- a/home/m3tam3re/m3-atlas.nix +++ b/home/m3tam3re/m3-atlas.nix @@ -1,15 +1,11 @@ # m3-atlas — primary server, Traefik hub and container host. # Context: server | Profiles: coding -{ - lib, - ... -}: -let - homeLib = import ../lib { inherit lib; }; +{lib, ...}: let + homeLib = import ../lib {inherit lib;}; in { imports = [ (homeLib.mkHomeConfig { - profiles = [ "coding" ]; + profiles = ["coding"]; context = "server"; }) ./home-server.nix diff --git a/home/m3tam3re/m3-daedalus.nix b/home/m3tam3re/m3-daedalus.nix index 3c09562..124dc4a 100644 --- a/home/m3tam3re/m3-daedalus.nix +++ b/home/m3tam3re/m3-daedalus.nix @@ -4,126 +4,124 @@ config, lib, ... -}: -let - homeLib = import ../lib { inherit lib; }; +}: let + homeLib = import ../lib {inherit lib;}; in -with lib; { - imports = [ - (homeLib.mkHomeConfig { - profiles = [ "coding" "media" ]; - context = "desktop"; - }) - ./home.nix - ]; + with lib; { + imports = [ + (homeLib.mkHomeConfig { + profiles = ["coding" "media"]; + context = "desktop"; + }) + ./home.nix + ]; - config = mkMerge [ - { - # Base CLI tools (new namespace) - base = { - shell = { - fish.enable = true; - nushell.enable = true; - starship.enable = true; + config = mkMerge [ + { + # Base CLI tools (new namespace) + base = { + shell = { + fish.enable = true; + nushell.enable = true; + starship.enable = true; + }; + cliTools = { + fzf.enable = true; + nitch.enable = true; + television.enable = true; + }; + secrets.enable = true; }; - cliTools = { - fzf.enable = true; - nitch.enable = true; - television.enable = true; - }; - secrets.enable = true; - }; - - # Desktop features (new namespace) - desktop = { - wm = { - hyprland.enable = false; - rofi.enable = true; - wayland.enable = false; + # Desktop features (new namespace) + desktop = { + wm = { + hyprland.enable = false; + rofi.enable = true; + wayland.enable = false; + }; + apps = { + obsidian.enable = true; + office.enable = false; + crypto.enable = false; + }; + theme = { + fonts.enable = true; + wallpapers.enable = false; + }; }; - apps = { - obsidian.enable = true; - office.enable = false; - crypto.enable = false; - }; - theme = { - fonts.enable = true; - wallpapers.enable = false; - }; - }; - # Coding environment - coding = { - editors = { - neovim.enable = true; - zed.enable = true; + # Coding environment + coding = { + editors = { + neovim.enable = true; + zed.enable = true; + }; + lsp.enable = true; }; - lsp.enable = true; - }; - # Media profile features - profiles.media = { - obs.enable = false; - ffmpeg.enable = false; - kdenlive.enable = false; - ytDlp.enable = true; - }; + # Media profile features + profiles.media = { + obs.enable = false; + ffmpeg.enable = false; + kdenlive.enable = false; + ytDlp.enable = true; + }; - xdg = { - enable = true; - configFile."mimeapps.list".force = true; - mimeApps = { + xdg = { enable = true; - associations.added = { - "application/zip" = [ "org.gnome.FileRoller.desktop" ]; - "application/csv" = [ "calc.desktop" ]; - "application/pdf" = [ "vivaldi-stable.desktop" ]; - "x-scheme-handler/http" = [ "vivaldi-stable.desktop" ]; - "x-scheme-handler/https" = [ "vivaldi-stable.desktop" ]; - }; - defaultApplications = { - "application/zip" = [ "org.gnome.FileRoller.desktop" ]; - "application/csv" = [ "calc.desktop" ]; - "application/pdf" = [ "vivaldi-stable.desktop" ]; - "application/md" = [ "dev.zed.Zed.desktop" ]; - "application/text" = [ "dev.zed.Zed.desktop" ]; - "x-scheme-handler/http" = [ "vivaldi-stable.desktop" ]; - "x-scheme-handler/https" = [ "vivaldi-stable.desktop" ]; + configFile."mimeapps.list".force = true; + mimeApps = { + enable = true; + associations.added = { + "application/zip" = ["org.gnome.FileRoller.desktop"]; + "application/csv" = ["calc.desktop"]; + "application/pdf" = ["vivaldi-stable.desktop"]; + "x-scheme-handler/http" = ["vivaldi-stable.desktop"]; + "x-scheme-handler/https" = ["vivaldi-stable.desktop"]; + }; + defaultApplications = { + "application/zip" = ["org.gnome.FileRoller.desktop"]; + "application/csv" = ["calc.desktop"]; + "application/pdf" = ["vivaldi-stable.desktop"]; + "application/md" = ["dev.zed.Zed.desktop"]; + "application/text" = ["dev.zed.Zed.desktop"]; + "x-scheme-handler/http" = ["vivaldi-stable.desktop"]; + "x-scheme-handler/https" = ["vivaldi-stable.desktop"]; + }; }; }; - }; - } + } - # Host-specific Hyprland layout — only applies when hyprland is enabled - (mkIf config.desktop.wm.hyprland.enable { - wayland.windowManager.hyprland = { - enable = true; - settings = { - monitor = [ - "eDP-1,preferred,0x0,1.25" - "HDMI-A-1,preferred,2560x0,1" - ]; - workspace = [ - "1, monitor:eDP-1, default:true" - "2, monitor:eDP-1" - "3, monitor:eDP-1" - "4, monitor:HDMI-A-1" - "5, monitor:HDMI-A-1,border:false,rounding:false" - "6, monitor:HDMI-A-1" - ]; - windowrule = [ - "match:class dev.zed.Zed, workspace 1" - "match:class Msty, workspace 1" - "match:class ^(com.obsproject.Studio)$, workspace 2" - "match:class ^(brave-browser)$, workspace 4, opacity 1.0" - "match:class ^(vivaldi-stable)$, workspace 4, opacity 1.0" - "match:class ^steam_app_\\d+$, fullscreen on" - "match:class ^steam_app_\\d+$, workspace 5" - "match:class ^steam_app_\\d+$, idle_inhibit focus" - ]; + # Host-specific Hyprland layout — only applies when hyprland is enabled + (mkIf config.desktop.wm.hyprland.enable { + wayland.windowManager.hyprland = { + enable = true; + settings = { + monitor = [ + "eDP-1,preferred,0x0,1.25" + "HDMI-A-1,preferred,2560x0,1" + ]; + workspace = [ + "1, monitor:eDP-1, default:true" + "2, monitor:eDP-1" + "3, monitor:eDP-1" + "4, monitor:HDMI-A-1" + "5, monitor:HDMI-A-1,border:false,rounding:false" + "6, monitor:HDMI-A-1" + ]; + windowrule = [ + "match:class dev.zed.Zed, workspace 1" + "match:class Msty, workspace 1" + "match:class ^(com.obsproject.Studio)$, workspace 2" + "match:class ^(brave-browser)$, workspace 4, opacity 1.0" + "match:class ^(vivaldi-stable)$, workspace 4, opacity 1.0" + "match:class ^steam_app_\\d+$, fullscreen on" + "match:class ^steam_app_\\d+$, workspace 5" + "match:class ^steam_app_\\d+$, idle_inhibit focus" + ]; + }; }; - }; - }) - ]; -} + }) + ]; + } diff --git a/home/m3tam3re/m3-helios.nix b/home/m3tam3re/m3-helios.nix index 17df42f..12fb021 100644 --- a/home/m3tam3re/m3-helios.nix +++ b/home/m3tam3re/m3-helios.nix @@ -1,15 +1,11 @@ # m3-helios — AdGuard DNS and internal routing server. # Context: server | Profiles: (none) -{ - lib, - ... -}: -let - homeLib = import ../lib { inherit lib; }; +{lib, ...}: let + homeLib = import ../lib {inherit lib;}; in { imports = [ (homeLib.mkHomeConfig { - profiles = [ ]; + profiles = []; context = "server"; }) ./home-server.nix @@ -26,5 +22,4 @@ in { nitch.enable = true; }; }; - } diff --git a/home/m3tam3re/m3-hermes.nix b/home/m3tam3re/m3-hermes.nix index e79822d..fe8d193 100644 --- a/home/m3tam3re/m3-hermes.nix +++ b/home/m3tam3re/m3-hermes.nix @@ -1,15 +1,11 @@ # m3-hermes — secondary server. # Context: server | Profiles: (none) -{ - lib, - ... -}: -let - homeLib = import ../lib { inherit lib; }; +{lib, ...}: let + homeLib = import ../lib {inherit lib;}; in { imports = [ (homeLib.mkHomeConfig { - profiles = [ ]; + profiles = []; context = "server"; }) ./home-server.nix @@ -26,5 +22,4 @@ in { nitch.enable = true; }; }; - } diff --git a/home/m3tam3re/m3-kratos.nix b/home/m3tam3re/m3-kratos.nix index 7d23493..333bbbd 100644 --- a/home/m3tam3re/m3-kratos.nix +++ b/home/m3tam3re/m3-kratos.nix @@ -4,129 +4,128 @@ config, lib, ... -}: -let - homeLib = import ../lib { inherit lib; }; +}: let + homeLib = import ../lib {inherit lib;}; in -with lib; { - imports = [ - (homeLib.mkHomeConfig { - profiles = [ "coding" "gaming" "media" ]; - context = "desktop"; - }) - ./home.nix - ]; + with lib; { + imports = [ + (homeLib.mkHomeConfig { + profiles = ["coding" "gaming" "media"]; + context = "desktop"; + }) + ./home.nix + ]; - config = mkMerge [ - { - # Base CLI tools (new namespace) - base = { - shell = { - nushell.enable = true; - starship.enable = true; + config = mkMerge [ + { + # Base CLI tools (new namespace) + base = { + shell = { + nushell.enable = true; + starship.enable = true; + }; + cliTools = { + fzf.enable = true; + nitch.enable = true; + television.enable = true; + }; + secrets.enable = true; }; - cliTools = { - fzf.enable = true; - nitch.enable = true; - television.enable = true; - }; - secrets.enable = true; - }; - # Desktop features (new namespace) - desktop = { - wm = { - hyprland.enable = true; - rofi.enable = true; - wayland.enable = true; + # Desktop features (new namespace) + desktop = { + wm = { + hyprland.enable = true; + rofi.enable = true; + wayland.enable = true; + }; + apps = { + crypto.enable = true; + obsidian.enable = true; + office.enable = true; + }; + theme = { + fonts.enable = true; + wallpapers.enable = true; + }; }; - apps = { - crypto.enable = true; - obsidian.enable = true; - office.enable = true; + + # Coding environment + coding = { + editors = { + neovim.enable = true; + zed.enable = true; + }; + lsp.enable = true; }; - theme = { - fonts.enable = true; - wallpapers.enable = true; + + # Gaming profile features + profiles.gaming = { + steam.enable = true; + gamescope.enable = true; }; - }; - # Coding environment - coding = { - editors = { - neovim.enable = true; - zed.enable = true; + # Media profile features + profiles.media = { + obs.enable = true; + ffmpeg.enable = true; + kdenlive.enable = true; + ytDlp.enable = true; }; - lsp.enable = true; - }; - # Gaming profile features - profiles.gaming = { - steam.enable = true; - gamescope.enable = true; - }; - - # Media profile features - profiles.media = { - obs.enable = true; - ffmpeg.enable = true; - kdenlive.enable = true; - ytDlp.enable = true; - }; - - xdg = { - enable = true; - configFile."mimeapps.list".force = true; - mimeApps = { + xdg = { enable = true; - associations.added = { - "application/zip" = [ "org.gnome.FileRoller.desktop" ]; - "application/csv" = [ "calc.desktop" ]; - "application/pdf" = [ "vivaldi-stable.desktop" ]; - "x-scheme-handler/http" = [ "vivaldi-stable.desktop" ]; - "x-scheme-handler/https" = [ "vivaldi-stable.desktop" ]; - }; - defaultApplications = { - "application/zip" = [ "org.gnome.FileRoller.desktop" ]; - "application/csv" = [ "calc.desktop" ]; - "application/pdf" = [ "vivaldi-stable.desktop" ]; - "application/md" = [ "dev.zed.Zed.desktop" ]; - "application/text" = [ "dev.zed.Zed.desktop" ]; - "x-scheme-handler/http" = [ "vivaldi-stable.desktop" ]; - "x-scheme-handler/https" = [ "vivaldi-stable.desktop" ]; + configFile."mimeapps.list".force = true; + mimeApps = { + enable = true; + associations.added = { + "application/zip" = ["org.gnome.FileRoller.desktop"]; + "application/csv" = ["calc.desktop"]; + "application/pdf" = ["vivaldi-stable.desktop"]; + "x-scheme-handler/http" = ["vivaldi-stable.desktop"]; + "x-scheme-handler/https" = ["vivaldi-stable.desktop"]; + }; + defaultApplications = { + "application/zip" = ["org.gnome.FileRoller.desktop"]; + "application/csv" = ["calc.desktop"]; + "application/pdf" = ["vivaldi-stable.desktop"]; + "application/md" = ["dev.zed.Zed.desktop"]; + "application/text" = ["dev.zed.Zed.desktop"]; + "x-scheme-handler/http" = ["vivaldi-stable.desktop"]; + "x-scheme-handler/https" = ["vivaldi-stable.desktop"]; + }; }; }; - }; - } + } - # Host-specific Hyprland monitor and workspace layout (dual 1440p monitors) - (mkIf config.desktop.wm.hyprland.enable { - wayland.windowManager.hyprland = { - enable = true; - settings = { - monitor = [ - "DP-1,2560x1440@144,0x0,1" - "DP-2,2560x1440@144,2560x0,1" - ]; - workspace = [ - "1, monitor:DP-1, default:true" - "2, monitor:DP-1" - "3, monitor:DP-1" - "4, monitor:DP-2" - "5, monitor:DP-2" - "6, monitor:DP-2" - "7, monitor:DP-2" - ]; - windowrule = [ - "match:class dev.zed.Zed, workspace 1" - "match:class Msty, workspace 1" - "match:class ^(com.obsproject.Studio)$, workspace 2" - "match:class ^(brave-browser)$, workspace 4, opacity 1.0" - "match:class ^(vivaldi-stable)$, workspace 4, opacity 1.0" - "match:class ^steam_app_\\d+$, idle_inhibit focus" - ]; + # Host-specific Hyprland monitor and workspace layout (dual 1440p monitors) + (mkIf config.desktop.wm.hyprland.enable { + wayland.windowManager.hyprland = { + enable = true; + settings = { + monitor = [ + "DP-1,2560x1440@144,0x0,1" + "DP-2,2560x1440@144,2560x0,1" + ]; + workspace = [ + "1, monitor:DP-1, default:true" + "2, monitor:DP-1" + "3, monitor:DP-1" + "4, monitor:DP-2" + "5, monitor:DP-2" + "6, monitor:DP-2" + "7, monitor:DP-2" + ]; + windowrule = [ + "match:class dev.zed.Zed, workspace 1" + "match:class Msty, workspace 1" + "match:class ^(com.obsproject.Studio)$, workspace 2" + "match:class ^(brave-browser)$, workspace 4, opacity 1.0" + "match:class ^(vivaldi-stable)$, workspace 4, opacity 1.0" + "match:class ^steam_app_\\d+$, idle_inhibit focus" + ]; + }; }; - }; - }) - ]; -} + }) + ]; + } diff --git a/hosts/m3-aether/hardware-configuration.nix b/hosts/m3-aether/hardware-configuration.nix index 4e571c8..7caa8fe 100644 --- a/hosts/m3-aether/hardware-configuration.nix +++ b/hosts/m3-aether/hardware-configuration.nix @@ -1,24 +1,28 @@ -# Do not modify this file! It was generated by ‘nixos-generate-config’ -# and may be overwritten by future invocations. Please make changes -# to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, modulesPath, ... }: - -{ - imports = - [ (modulesPath + "/profiles/qemu-guest.nix") - ]; - - boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ ]; - boot.extraModulePackages = [ ]; - - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking - # (the default) this is the recommended approach. When using systemd-networkd it's - # still possible to use this option, but it's recommended to use it in conjunction - # with explicit per-interface declarations with `networking.interfaces..useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.ens18.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; -} +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ + config, + lib, + pkgs, + modulesPath, + ... +}: { + imports = [ + (modulesPath + "/profiles/qemu-guest.nix") + ]; + + boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod"]; + boot.initrd.kernelModules = []; + boot.kernelModules = []; + boot.extraModulePackages = []; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.ens18.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; +} diff --git a/hosts/m3-ares/services/postgres.nix b/hosts/m3-ares/services/postgres.nix index 4b8feec..eb46ca8 100644 --- a/hosts/m3-ares/services/postgres.nix +++ b/hosts/m3-ares/services/postgres.nix @@ -1,7 +1,4 @@ -{ - pkgs, - ... -}: { +{pkgs, ...}: { services.postgresql = { enable = true; package = pkgs.postgresql_17; diff --git a/hosts/m3-atlas/services/containers/kestra.nix b/hosts/m3-atlas/services/containers/kestra.nix index 87ceb79..8882d8c 100644 --- a/hosts/m3-atlas/services/containers/kestra.nix +++ b/hosts/m3-atlas/services/containers/kestra.nix @@ -1,9 +1,9 @@ -{ config, ... }: { +{config, ...}: { virtualisation.oci-containers.containers."kestra" = { image = "docker.io/kestra/kestra:latest"; - environmentFiles = [ config.age.secrets.kestra-env.path ]; - cmd = [ "server" "standalone" "--config" "/etc/config/application.yaml"]; - ports = [ "127.0.0.1:3018:8080" ]; + environmentFiles = [config.age.secrets.kestra-env.path]; + cmd = ["server" "standalone" "--config" "/etc/config/application.yaml"]; + ports = ["127.0.0.1:3018:8080"]; user = "root"; volumes = [ "/var/run/docker.sock:/var/run/docker.sock" @@ -11,8 +11,7 @@ "kestra_data:/app/storage" "/tmp/kestra-wd:/tmp/kestra-wd" ]; - extraOptions = - [ "--add-host=postgres:10.89.0.1" "--ip=10.89.0.18" "--network=web" ]; + extraOptions = ["--add-host=postgres:10.89.0.1" "--ip=10.89.0.18" "--network=web"]; }; systemd.tmpfiles.rules = [ @@ -21,12 +20,11 @@ # Traefik configuration specific to littlelink services.traefik.dynamicConfigOptions.http = { - services.kestra.loadBalancer.servers = - [{ url = "http://localhost:3018/"; }]; + services.kestra.loadBalancer.servers = [{url = "http://localhost:3018/";}]; routers.kestra = { rule = "Host(`k.m3ta.dev`)"; - tls = { certResolver = "godaddy"; }; + tls = {certResolver = "godaddy";}; service = "kestra"; entrypoints = "websecure"; }; diff --git a/hosts/m3-helios/hardware-configuration.nix b/hosts/m3-helios/hardware-configuration.nix index 4e571c8..7caa8fe 100644 --- a/hosts/m3-helios/hardware-configuration.nix +++ b/hosts/m3-helios/hardware-configuration.nix @@ -1,24 +1,28 @@ -# Do not modify this file! It was generated by ‘nixos-generate-config’ -# and may be overwritten by future invocations. Please make changes -# to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, modulesPath, ... }: - -{ - imports = - [ (modulesPath + "/profiles/qemu-guest.nix") - ]; - - boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ ]; - boot.extraModulePackages = [ ]; - - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking - # (the default) this is the recommended approach. When using systemd-networkd it's - # still possible to use this option, but it's recommended to use it in conjunction - # with explicit per-interface declarations with `networking.interfaces..useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.ens18.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; -} +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ + config, + lib, + pkgs, + modulesPath, + ... +}: { + imports = [ + (modulesPath + "/profiles/qemu-guest.nix") + ]; + + boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod"]; + boot.initrd.kernelModules = []; + boot.kernelModules = []; + boot.extraModulePackages = []; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.ens18.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; +} diff --git a/hosts/m3-hermes/hardware-configuration.nix b/hosts/m3-hermes/hardware-configuration.nix index 419024b..d52e1a3 100644 --- a/hosts/m3-hermes/hardware-configuration.nix +++ b/hosts/m3-hermes/hardware-configuration.nix @@ -1,7 +1,13 @@ # Do not modify this file! It was generated by 'nixos-generate-config' # and may be overwritten by future invocations. Please make changes # to configuration.nix instead. -{config, lib, pkgs, modulesPath, ...}: { +{ + config, + lib, + pkgs, + modulesPath, + ... +}: { imports = [ (modulesPath + "/profiles/qemu-guest.nix") ]; From cc01c1d0aa8313099f37b4416c68058d85582c95 Mon Sep 17 00:00:00 2001 From: m3tm3re Date: Sun, 26 Apr 2026 11:37:17 +0200 Subject: [PATCH 08/13] fix(agents): make videoDrivers optional with safe default For standalone Home Manager evaluation where videoDrivers may be absent --- home/coding/agents/agents.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home/coding/agents/agents.nix b/home/coding/agents/agents.nix index 2524823..acd840f 100644 --- a/home/coding/agents/agents.nix +++ b/home/coding/agents/agents.nix @@ -6,7 +6,7 @@ inputs, lib, pkgs, - videoDrivers, + videoDrivers ? [], ... }: with lib; let From 3c9a1076082543b0d22d9853e26dd9bf80ac1590 Mon Sep 17 00:00:00 2001 From: m3tm3re Date: Sun, 26 Apr 2026 12:06:36 +0200 Subject: [PATCH 09/13] feat: add missing packages and programs to base cli-tools - packages.nix: essential packages (jq, ripgrep, fd, htop, coreutils, lazygit, httpie, just, devenv, gcc, go, sqlite, sqlite-vec, nix-index, nix-update, progress, comma, fabric-ai, llm, basecamp, hyprpaper-random, libnotify, trash-cli, unzip, zip, yazi) - bat.nix: bat with nix-colors derived syntax theme - carapace.nix: multi-shell completion (fish, nushell, bash) - direnv.nix: automatic env loading with nix-direnv - eza.nix: modern ls with icons, git status, long format - lf.nix: terminal file manager with bat preview - zoxide.nix: smarter cd with fish and nushell integration - zellij-ps.nix: project session manager wrapping cli.zellij-ps --- home/base/cli-tools/bat.nix | 144 ++++++++++++++++++++++++++++++ home/base/cli-tools/carapace.nix | 20 +++++ home/base/cli-tools/default.nix | 8 ++ home/base/cli-tools/direnv.nix | 19 ++++ home/base/cli-tools/eza.nix | 20 +++++ home/base/cli-tools/lf.nix | 27 ++++++ home/base/cli-tools/packages.nix | 51 +++++++++++ home/base/cli-tools/zellij-ps.nix | 27 ++++++ home/base/cli-tools/zoxide.nix | 19 ++++ 9 files changed, 335 insertions(+) create mode 100644 home/base/cli-tools/bat.nix create mode 100644 home/base/cli-tools/carapace.nix create mode 100644 home/base/cli-tools/direnv.nix create mode 100644 home/base/cli-tools/eza.nix create mode 100644 home/base/cli-tools/lf.nix create mode 100644 home/base/cli-tools/packages.nix create mode 100644 home/base/cli-tools/zellij-ps.nix create mode 100644 home/base/cli-tools/zoxide.nix diff --git a/home/base/cli-tools/bat.nix b/home/base/cli-tools/bat.nix new file mode 100644 index 0000000..473ae69 --- /dev/null +++ b/home/base/cli-tools/bat.nix @@ -0,0 +1,144 @@ +# Bat — cat replacement with nix-colors syntax highlighting theme. +{ + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.base.cliTools.bat; + palette = config.colorScheme.palette; +in { + options.base.cliTools.bat.enable = mkEnableOption "enable bat with nix-colors theme"; + + config = mkIf cfg.enable { + programs.bat = { + enable = true; + config = {theme = "universal";}; + themes = { + universal = { + src = pkgs.writeText "universal.tmTheme" '' + + + + + name + Universal (nix-colors) + settings + + + settings + + background + #${palette.base00} + foreground + #${palette.base05} + caret + #${palette.base05} + selection + #${palette.base02} + selectionForeground + #${palette.base05} + lineHighlight + #${palette.base01} + + + + name + Comment + scope + comment + settings + + foreground + #${palette.base03} + fontStyle + italic + + + + name + String + scope + string + settings + + foreground + #${palette.base0A} + + + + name + Number + scope + constant.numeric + settings + + foreground + #${palette.base0E} + + + + name + Keyword + scope + keyword + settings + + foreground + #${palette.base08} + + + + name + Function + scope + entity.name.function + settings + + foreground + #${palette.base0B} + + + + name + Type + scope + entity.name.type, storage.type + settings + + foreground + #${palette.base0D} + + + + name + Variable + scope + variable + settings + + foreground + #${palette.base05} + + + + name + Constant + scope + constant + settings + + foreground + #${palette.base0E} + + + + + + ''; + }; + }; + }; + }; +} diff --git a/home/base/cli-tools/carapace.nix b/home/base/cli-tools/carapace.nix new file mode 100644 index 0000000..5fbb595 --- /dev/null +++ b/home/base/cli-tools/carapace.nix @@ -0,0 +1,20 @@ +# Carapace — multi-shell completion engine with Fish, Nushell, and Bash integration. +{ + config, + lib, + ... +}: +with lib; let + cfg = config.base.cliTools.carapace; +in { + options.base.cliTools.carapace.enable = mkEnableOption "enable carapace completion engine"; + + config = mkIf cfg.enable { + programs.carapace = { + enable = true; + enableFishIntegration = true; + enableNushellIntegration = true; + enableBashIntegration = true; + }; + }; +} diff --git a/home/base/cli-tools/default.nix b/home/base/cli-tools/default.nix index 0a4dd8f..3125597 100644 --- a/home/base/cli-tools/default.nix +++ b/home/base/cli-tools/default.nix @@ -1,9 +1,17 @@ # CLI tools aggregator — imports all base command-line utilities. {...}: { imports = [ + ./bat.nix + ./carapace.nix + ./direnv.nix + ./eza.nix ./fzf.nix + ./lf.nix ./nitch.nix + ./packages.nix ./television.nix ./zellij.nix + ./zellij-ps.nix + ./zoxide.nix ]; } diff --git a/home/base/cli-tools/direnv.nix b/home/base/cli-tools/direnv.nix new file mode 100644 index 0000000..d7f7c7e --- /dev/null +++ b/home/base/cli-tools/direnv.nix @@ -0,0 +1,19 @@ +# Direnv — automatic environment loading with nix-direnv integration. +{ + config, + lib, + ... +}: +with lib; let + cfg = config.base.cliTools.direnv; +in { + options.base.cliTools.direnv.enable = mkEnableOption "enable direnv with nix-direnv"; + + config = mkIf cfg.enable { + programs.direnv = { + enable = true; + enableNushellIntegration = true; + nix-direnv.enable = true; + }; + }; +} diff --git a/home/base/cli-tools/eza.nix b/home/base/cli-tools/eza.nix new file mode 100644 index 0000000..9d2df93 --- /dev/null +++ b/home/base/cli-tools/eza.nix @@ -0,0 +1,20 @@ +# Eza — modern ls replacement with icons, git status, and long format by default. +{ + config, + lib, + ... +}: +with lib; let + cfg = config.base.cliTools.eza; +in { + options.base.cliTools.eza.enable = mkEnableOption "enable eza modern ls replacement"; + + config = mkIf cfg.enable { + programs.eza = { + enable = true; + enableFishIntegration = true; + enableBashIntegration = true; + extraOptions = ["-l" "--icons" "--git" "-a"]; + }; + }; +} diff --git a/home/base/cli-tools/lf.nix b/home/base/cli-tools/lf.nix new file mode 100644 index 0000000..67bc50a --- /dev/null +++ b/home/base/cli-tools/lf.nix @@ -0,0 +1,27 @@ +# Lf — terminal file manager with bat preview and Dracula theme. +{ + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.base.cliTools.lf; +in { + options.base.cliTools.lf.enable = mkEnableOption "enable lf terminal file manager"; + + config = mkIf cfg.enable { + home.packages = [pkgs.lf]; + + programs.lf = { + enable = true; + settings = { + preview = true; + drawbox = true; + hidden = true; + icons = true; + previewer = "bat"; + }; + }; + }; +} diff --git a/home/base/cli-tools/packages.nix b/home/base/cli-tools/packages.nix new file mode 100644 index 0000000..fcfec2a --- /dev/null +++ b/home/base/cli-tools/packages.nix @@ -0,0 +1,51 @@ +# Essential CLI packages — core utilities always available on every host. +{ + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.base.cliTools.essentials; +in { + options.base.cliTools.essentials.enable = mkEnableOption "enable essential CLI packages"; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ + # Core utilities + coreutils + fd + htop + jq + ripgrep + + # Dev tools + devenv + gcc + go + httpie + just + lazygit + nix-index + nix-update + progress + sqlite + sqlite-vec + tldr + + # AI tools + comma + fabric-ai + llm + + # Misc + basecamp + hyprpaper-random + libnotify + trash-cli + unzip + yazi + zip + ]; + }; +} diff --git a/home/base/cli-tools/zellij-ps.nix b/home/base/cli-tools/zellij-ps.nix new file mode 100644 index 0000000..c2f8c72 --- /dev/null +++ b/home/base/cli-tools/zellij-ps.nix @@ -0,0 +1,27 @@ +# Zellij-ps — project-aware Zellij session manager from m3ta-nixpkgs. +# Delegates to the cli.zellij-ps module provided by inputs.m3ta-nixpkgs. +{ + config, + lib, + ... +}: +with lib; let + cfg = config.base.cliTools.zellijPs; +in { + options.base.cliTools.zellijPs = { + enable = mkEnableOption "enable zellij-ps project session manager"; + + projectFolders = mkOption { + type = types.listOf types.path; + description = "Project root folders scanned by zellij-ps."; + default = ["${config.home.homeDirectory}/p"]; + }; + }; + + config = mkIf cfg.enable { + cli.zellij-ps = { + enable = true; + projectFolders = cfg.projectFolders; + }; + }; +} diff --git a/home/base/cli-tools/zoxide.nix b/home/base/cli-tools/zoxide.nix new file mode 100644 index 0000000..8c27c6f --- /dev/null +++ b/home/base/cli-tools/zoxide.nix @@ -0,0 +1,19 @@ +# Zoxide — smarter cd with Fish and Nushell integration. +{ + config, + lib, + ... +}: +with lib; let + cfg = config.base.cliTools.zoxide; +in { + options.base.cliTools.zoxide.enable = mkEnableOption "enable zoxide smarter cd"; + + config = mkIf cfg.enable { + programs.zoxide = { + enable = true; + enableFishIntegration = true; + enableNushellIntegration = true; + }; + }; +} From 8f5d076d7bb4b21da0d794318c984523d98e75d4 Mon Sep 17 00:00:00 2001 From: m3tm3re Date: Sun, 26 Apr 2026 12:16:44 +0200 Subject: [PATCH 10/13] =?UTF-8?q?fix:=20make=20base=20modules=20enabled=20?= =?UTF-8?q?by=20default;=20document=20lazylib=E2=86=92lazygit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - All base/* modules now use (mkEnableOption "...") // { default = true; } so they activate automatically when imported — no explicit .enable = true required in host configs - packages.nix: add comment documenting that lazylib does not exist in nixpkgs; lazygit is the correct and intended package - zellij-ps.nix: clarify that cli.zellij-ps namespace is intentional — it is the home-manager module convention from m3ta-nixpkgs - nix flake check passes (warnings are pre-existing) --- home/base/cli-tools/bat.nix | 3 ++- home/base/cli-tools/carapace.nix | 3 ++- home/base/cli-tools/direnv.nix | 3 ++- home/base/cli-tools/eza.nix | 3 ++- home/base/cli-tools/fzf.nix | 3 ++- home/base/cli-tools/lf.nix | 3 ++- home/base/cli-tools/nitch.nix | 3 ++- home/base/cli-tools/packages.nix | 5 ++++- home/base/cli-tools/television.nix | 3 ++- home/base/cli-tools/zellij-ps.nix | 7 +++++-- home/base/cli-tools/zellij.nix | 3 ++- home/base/cli-tools/zoxide.nix | 3 ++- home/base/secrets/secrets.nix | 3 ++- home/base/shell/fish.nix | 3 ++- home/base/shell/nushell.nix | 3 ++- home/base/shell/starship.nix | 3 ++- 16 files changed, 37 insertions(+), 17 deletions(-) diff --git a/home/base/cli-tools/bat.nix b/home/base/cli-tools/bat.nix index 473ae69..9a0e213 100644 --- a/home/base/cli-tools/bat.nix +++ b/home/base/cli-tools/bat.nix @@ -9,7 +9,8 @@ with lib; let cfg = config.base.cliTools.bat; palette = config.colorScheme.palette; in { - options.base.cliTools.bat.enable = mkEnableOption "enable bat with nix-colors theme"; + # Enabled by default — base modules are always-on. + options.base.cliTools.bat.enable = (mkEnableOption "enable bat with nix-colors theme") // {default = true;}; config = mkIf cfg.enable { programs.bat = { diff --git a/home/base/cli-tools/carapace.nix b/home/base/cli-tools/carapace.nix index 5fbb595..ea9194e 100644 --- a/home/base/cli-tools/carapace.nix +++ b/home/base/cli-tools/carapace.nix @@ -7,7 +7,8 @@ with lib; let cfg = config.base.cliTools.carapace; in { - options.base.cliTools.carapace.enable = mkEnableOption "enable carapace completion engine"; + # Enabled by default — base modules are always-on. + options.base.cliTools.carapace.enable = (mkEnableOption "enable carapace completion engine") // {default = true;}; config = mkIf cfg.enable { programs.carapace = { diff --git a/home/base/cli-tools/direnv.nix b/home/base/cli-tools/direnv.nix index d7f7c7e..4ca206a 100644 --- a/home/base/cli-tools/direnv.nix +++ b/home/base/cli-tools/direnv.nix @@ -7,7 +7,8 @@ with lib; let cfg = config.base.cliTools.direnv; in { - options.base.cliTools.direnv.enable = mkEnableOption "enable direnv with nix-direnv"; + # Enabled by default — base modules are always-on. + options.base.cliTools.direnv.enable = (mkEnableOption "enable direnv with nix-direnv") // {default = true;}; config = mkIf cfg.enable { programs.direnv = { diff --git a/home/base/cli-tools/eza.nix b/home/base/cli-tools/eza.nix index 9d2df93..2e432a8 100644 --- a/home/base/cli-tools/eza.nix +++ b/home/base/cli-tools/eza.nix @@ -7,7 +7,8 @@ with lib; let cfg = config.base.cliTools.eza; in { - options.base.cliTools.eza.enable = mkEnableOption "enable eza modern ls replacement"; + # Enabled by default — base modules are always-on. + options.base.cliTools.eza.enable = (mkEnableOption "enable eza modern ls replacement") // {default = true;}; config = mkIf cfg.enable { programs.eza = { diff --git a/home/base/cli-tools/fzf.nix b/home/base/cli-tools/fzf.nix index f4ef6af..4093298 100644 --- a/home/base/cli-tools/fzf.nix +++ b/home/base/cli-tools/fzf.nix @@ -7,7 +7,8 @@ with lib; let cfg = config.base.cliTools.fzf; in { - options.base.cliTools.fzf.enable = mkEnableOption "enable fuzzy finder"; + # Enabled by default — base modules are always-on. + options.base.cliTools.fzf.enable = (mkEnableOption "enable fuzzy finder") // {default = true;}; config = mkIf cfg.enable { programs.fzf = { diff --git a/home/base/cli-tools/lf.nix b/home/base/cli-tools/lf.nix index 67bc50a..50ff740 100644 --- a/home/base/cli-tools/lf.nix +++ b/home/base/cli-tools/lf.nix @@ -8,7 +8,8 @@ with lib; let cfg = config.base.cliTools.lf; in { - options.base.cliTools.lf.enable = mkEnableOption "enable lf terminal file manager"; + # Enabled by default — base modules are always-on. + options.base.cliTools.lf.enable = (mkEnableOption "enable lf terminal file manager") // {default = true;}; config = mkIf cfg.enable { home.packages = [pkgs.lf]; diff --git a/home/base/cli-tools/nitch.nix b/home/base/cli-tools/nitch.nix index dc2147d..eac4d62 100644 --- a/home/base/cli-tools/nitch.nix +++ b/home/base/cli-tools/nitch.nix @@ -8,7 +8,8 @@ with lib; let cfg = config.base.cliTools.nitch; in { - options.base.cliTools.nitch.enable = mkEnableOption "enable nitch"; + # Enabled by default — base modules are always-on. + options.base.cliTools.nitch.enable = (mkEnableOption "enable nitch") // {default = true;}; config = mkIf cfg.enable { home.packages = [pkgs.nitch]; diff --git a/home/base/cli-tools/packages.nix b/home/base/cli-tools/packages.nix index fcfec2a..fa226f4 100644 --- a/home/base/cli-tools/packages.nix +++ b/home/base/cli-tools/packages.nix @@ -1,4 +1,6 @@ # Essential CLI packages — core utilities always available on every host. +# NOTE: `lazylib` does not exist in nixpkgs. `lazygit` is the correct package +# (Git TUI) and is intentionally used here instead. { config, lib, @@ -8,7 +10,8 @@ with lib; let cfg = config.base.cliTools.essentials; in { - options.base.cliTools.essentials.enable = mkEnableOption "enable essential CLI packages"; + # Enabled by default — base modules are always-on. + options.base.cliTools.essentials.enable = (mkEnableOption "enable essential CLI packages") // {default = true;}; config = mkIf cfg.enable { home.packages = with pkgs; [ diff --git a/home/base/cli-tools/television.nix b/home/base/cli-tools/television.nix index 3c6aa67..3a74203 100644 --- a/home/base/cli-tools/television.nix +++ b/home/base/cli-tools/television.nix @@ -7,7 +7,8 @@ with lib; let cfg = config.base.cliTools.television; in { - options.base.cliTools.television.enable = mkEnableOption "enable television"; + # Enabled by default — base modules are always-on. + options.base.cliTools.television.enable = (mkEnableOption "enable television") // {default = true;}; config = mkIf cfg.enable { programs.television = { diff --git a/home/base/cli-tools/zellij-ps.nix b/home/base/cli-tools/zellij-ps.nix index c2f8c72..8dac702 100644 --- a/home/base/cli-tools/zellij-ps.nix +++ b/home/base/cli-tools/zellij-ps.nix @@ -1,5 +1,7 @@ # Zellij-ps — project-aware Zellij session manager from m3ta-nixpkgs. -# Delegates to the cli.zellij-ps module provided by inputs.m3ta-nixpkgs. +# Delegates to `cli.zellij-ps` — the home-manager module namespace provided by +# m3ta-nixpkgs (inputs.m3ta-nixpkgs.nixosModules.default). This is intentional; +# `cli.*` is the convention used by m3ta-nixpkgs home-manager modules. { config, lib, @@ -9,7 +11,8 @@ with lib; let cfg = config.base.cliTools.zellijPs; in { options.base.cliTools.zellijPs = { - enable = mkEnableOption "enable zellij-ps project session manager"; + # Enabled by default — base modules are always-on. + enable = (mkEnableOption "enable zellij-ps project session manager") // {default = true;}; projectFolders = mkOption { type = types.listOf types.path; diff --git a/home/base/cli-tools/zellij.nix b/home/base/cli-tools/zellij.nix index 38e5c40..efe2c6c 100644 --- a/home/base/cli-tools/zellij.nix +++ b/home/base/cli-tools/zellij.nix @@ -7,7 +7,8 @@ with lib; let cfg = config.base.cliTools.zellij; in { - options.base.cliTools.zellij.enable = mkEnableOption "enable zellij multiplexer"; + # Enabled by default — base modules are always-on. + options.base.cliTools.zellij.enable = (mkEnableOption "enable zellij multiplexer") // {default = true;}; config = mkIf cfg.enable { programs.zellij = { diff --git a/home/base/cli-tools/zoxide.nix b/home/base/cli-tools/zoxide.nix index 8c27c6f..bc3e80e 100644 --- a/home/base/cli-tools/zoxide.nix +++ b/home/base/cli-tools/zoxide.nix @@ -7,7 +7,8 @@ with lib; let cfg = config.base.cliTools.zoxide; in { - options.base.cliTools.zoxide.enable = mkEnableOption "enable zoxide smarter cd"; + # Enabled by default — base modules are always-on. + options.base.cliTools.zoxide.enable = (mkEnableOption "enable zoxide smarter cd") // {default = true;}; config = mkIf cfg.enable { programs.zoxide = { diff --git a/home/base/secrets/secrets.nix b/home/base/secrets/secrets.nix index 7a72827..324546b 100644 --- a/home/base/secrets/secrets.nix +++ b/home/base/secrets/secrets.nix @@ -8,7 +8,8 @@ with lib; let cfg = config.base.secrets; in { - options.base.secrets.enable = mkEnableOption "enable secrets management"; + # Enabled by default — base modules are always-on. + options.base.secrets.enable = (mkEnableOption "enable secrets management") // {default = true;}; config = mkIf cfg.enable { programs.password-store = { diff --git a/home/base/shell/fish.nix b/home/base/shell/fish.nix index 94e65ec..6c6e3ad 100644 --- a/home/base/shell/fish.nix +++ b/home/base/shell/fish.nix @@ -7,7 +7,8 @@ with lib; let cfg = config.base.shell.fish; in { - options.base.shell.fish.enable = mkEnableOption "enable fish shell"; + # Enabled by default — base modules are always-on. + options.base.shell.fish.enable = (mkEnableOption "enable fish shell") // {default = true;}; config = mkIf cfg.enable { programs.fish = { diff --git a/home/base/shell/nushell.nix b/home/base/shell/nushell.nix index 9bf837a..fccb7f0 100644 --- a/home/base/shell/nushell.nix +++ b/home/base/shell/nushell.nix @@ -7,7 +7,8 @@ with lib; let cfg = config.base.shell.nushell; in { - options.base.shell.nushell.enable = mkEnableOption "enable nushell"; + # Enabled by default — base modules are always-on. + options.base.shell.nushell.enable = (mkEnableOption "enable nushell") // {default = true;}; config = mkIf cfg.enable { programs.nushell = { diff --git a/home/base/shell/starship.nix b/home/base/shell/starship.nix index 3fb6c10..5d467d6 100644 --- a/home/base/shell/starship.nix +++ b/home/base/shell/starship.nix @@ -7,7 +7,8 @@ with lib; let cfg = config.base.shell.starship; in { - options.base.shell.starship.enable = mkEnableOption "enable starship prompt"; + # Enabled by default — base modules are always-on. + options.base.shell.starship.enable = (mkEnableOption "enable starship prompt") // {default = true;}; config = mkIf cfg.enable { programs.starship = { From d19b87f8cd19cd869ebd50af439e27fc337dfe72 Mon Sep 17 00:00:00 2001 From: m3tm3re Date: Sun, 26 Apr 2026 12:29:14 +0200 Subject: [PATCH 11/13] feat: add coding packages module (bruno, insomnia) --- docs/plans/2026-04-27-missing-packages.md | 259 +++++++++++++++++++++ home/base/secrets/cli-tools/bat.nix | 145 ++++++++++++ home/base/secrets/cli-tools/carapace.nix | 21 ++ home/base/secrets/cli-tools/default.nix | 17 ++ home/base/secrets/cli-tools/direnv.nix | 20 ++ home/base/secrets/cli-tools/eza.nix | 21 ++ home/base/secrets/cli-tools/fzf.nix | 41 ++++ home/base/secrets/cli-tools/lf.nix | 28 +++ home/base/secrets/cli-tools/nitch.nix | 17 ++ home/base/secrets/cli-tools/packages.nix | 54 +++++ home/base/secrets/cli-tools/television.nix | 60 +++++ home/base/secrets/cli-tools/zellij-ps.nix | 30 +++ home/base/secrets/cli-tools/zellij.nix | 34 +++ home/base/secrets/cli-tools/zoxide.nix | 20 ++ home/coding/default.nix | 3 +- home/coding/packages.nix | 20 ++ home/m3tam3re/m3-ares.nix | 1 + 17 files changed, 790 insertions(+), 1 deletion(-) create mode 100644 docs/plans/2026-04-27-missing-packages.md create mode 100644 home/base/secrets/cli-tools/bat.nix create mode 100644 home/base/secrets/cli-tools/carapace.nix create mode 100644 home/base/secrets/cli-tools/default.nix create mode 100644 home/base/secrets/cli-tools/direnv.nix create mode 100644 home/base/secrets/cli-tools/eza.nix create mode 100644 home/base/secrets/cli-tools/fzf.nix create mode 100644 home/base/secrets/cli-tools/lf.nix create mode 100644 home/base/secrets/cli-tools/nitch.nix create mode 100644 home/base/secrets/cli-tools/packages.nix create mode 100644 home/base/secrets/cli-tools/television.nix create mode 100644 home/base/secrets/cli-tools/zellij-ps.nix create mode 100644 home/base/secrets/cli-tools/zellij.nix create mode 100644 home/base/secrets/cli-tools/zoxide.nix create mode 100644 home/coding/packages.nix diff --git a/docs/plans/2026-04-27-missing-packages.md b/docs/plans/2026-04-27-missing-packages.md new file mode 100644 index 0000000..303aff9 --- /dev/null +++ b/docs/plans/2026-04-27-missing-packages.md @@ -0,0 +1,259 @@ +# Missing Packages Implementation Plan + +> **Goal:** Restore missing packages from old configuration to new profile-based structure + +**Context:** The home profile restructuring (Task 1-5) moved files but left many packages unaccounted for. This plan categorizes and assigns each package to the appropriate location. + +--- + +## Package Categorization + +### Base Layer (`home/base/`) — Always Available + +These are CLI tools that work on any system (server or desktop): + +| Package | Source | Module | Option | +|---------|--------|--------|--------| +| `jq` | old cli | `home/base/cli-tools/default.nix` | `home.packages` | +| `ripgrep` | old cli | `home/base/cli-tools/default.nix` | `home.packages` | +| `fd` | old cli | `home/base/cli-tools/default.nix` | `home.packages` | +| `coreutils` | old cli | `home/base/cli-tools/default.nix` | `home.packages` | +| `htop` | old cli | `home/base/cli-tools/default.nix` | `home.packages` | +| `httpie` | old cli | `home/base/cli-tools/default.nix` | `home.packages` | +| `just` | old cli | `home/base/cli-tools/default.nix` | `home.packages` | +| `lazygit` | old cli | `home/base/cli-tools/default.nix` | `home.packages` | +| `lf` | old cli | `home/base/cli-tools/default.nix` | `home/packages` | +| `tldr` | old cli | `home/base/cli-tools/default.nix` | `home.packages` | +| `trash-cli` | old cli | `home/base/cli-tools/default.nix` | `home.packages` | +| `unzip` | old cli | `home/base/cli-tools/default.nix` | `home.packages` | +| `zip` | old cli | `home/base/cli-tools/default.nix` | `home.packages` | +| `yazi` | old cli | `home/base/cli-tools/default.nix` | `home.packages` | +| `gcc` | old cli | `home/base/cli-tools/default.nix` | `home.packages` | +| `go` | old cli | `home/base/cli-tools/default.nix` | `home.packages` | +| `sqlite` | old cli | `home/base/cli-tools/default.nix` | `home.packages` | +| `sqlite-vec` | old cli | `home/base/cli-tools/default.nix` | `home.packages` | +| `nix-index` | old cli | `home/base/cli-tools/default.nix` | `home.packages` | +| `nix-update` | old cli | `home/base/cli-tools/default.nix` | `home.packages` | +| `progress` | old cli | `home/base/cli-tools/default.nix` | `home.packages` | +| `devenv` | old cli | `home/base/cli-tools/default.nix` | `home.packages` | +| `libnotify` | old cli | `home/base/cli-tools/default.nix` | `home.packages` | +| `basecamp` | old cli | `home/base/cli-tools/default.nix` | `home.packages` | +| `comma` | old cli | `home/base/cli-tools/default.nix` | `home.packages` | +| `fabric-ai` | old cli | `home/base/cli-tools/default.nix` | `home.packages` | +| `llm` | old cli | `home/base/cli-tools/default.nix` | `home.packages` | +| `hyprpaper-random` | old cli | `home/base/cli-tools/default.nix` | `home.packages` | + +**Note:** `hyprpaper-random` is in base despite being Hyprland-specific. Alternative: move to `desktop/wm/` if it causes issues on non-Hyprland systems. + +### Base Programs (CLI Integration) + +These are programs with shell integration, placed in `home/base/cli-tools/`: + +| Program | Source | Module | Option | +|---------|--------|--------|--------| +| `carapace` | old cli | `home/base/cli-tools/default.nix` | `programs.carapace` | +| `zoxide` | old cli | `home/base/cli-tools/default.nix` | `programs.zoxide` | +| `bat` | old cli | `home/base/cli-tools/default.nix` | `programs.bat` | +| `direnv` | old cli | `home/base/cli-tools/default.nix` | `programs.direnv` | +| `eza` | old cli | `home/base/cli-tools/default.nix` | `programs.eza` | +| `lf` | old cli | `home/base/cli-tools/default.nix` | `programs.lf` | +| `zellij-ps` | old cli | `home/base/cli-tools/default.nix` | `cli.zellij-ps` | + +### Coding Layer (`home/coding/`) — Developer Tools + +| Package | Source | Module | Option | +|---------|--------|--------|--------| +| `bruno` | old desktop/coding | `home/coding/packages.nix` | `home.packages` | +| `insomnia` | old desktop/coding | `home/coding/packages.nix` | `home.packages` | +| `vim` | - | `home/coding/packages.nix` | `home.packages` | + +**New module:** `home/coding/packages.nix` (or inline into `coding/default.nix`) + +### Desktop Layer (`home/desktop/`) — Desktop-Specific + +| Package | Source | Module | Option | +|---------|--------|--------|--------| +| `vibetyper` | old desktop | `home/desktop/apps/default.nix` | `home.packages` | +| `pomodoro-timer` | old cli | `home/desktop/apps/default.nix` | `home.packages` | +| `launch-timer` | - | `home/desktop/apps/default.nix` | `home.packages` | + +**Note:** `launch-timer` needs investigation - is it a custom script or nixpkgs package? + +### Gaming Profile (`home/profiles/gaming/`) — Gaming Only + +| Package | Source | Module | Option | +|---------|--------|--------|--------| +| `rocmPackages.rocm-smi` | old cli | `home/profiles/gaming/default.nix` | `home.packages` | +| `rocmPackages.rocminfo` | old cli | `home/profiles/gaming/default.nix` | `home.packages` | +| `rocmPackages.rocm-runtime` | old cli | `home/profiles/gaming/default.nix` | `home.packages` | +| `vulkan-tools` | old cli | `home/profiles/gaming/default.nix` | `home.packages` | + +**Rationale:** ROCm is for AMD GPUs used in gaming (e.g., ROG Ally, gaming laptops with AMD dGPUs). This keeps server configs clean. + +### Media Profile (`home/profiles/media/`) — Media Creation + +| Package | Source | Module | Option | +|---------|--------|--------|--------| +| `plexamp` | old desktop/media | `home/profiles/media/default.nix` | `home.packages` | +| `webcord` | old desktop/media | `home/profiles/media/default.nix` | `home.packages` | +| `unimatrix` | old cli | `home/profiles/media/default.nix` | `home.packages` | +| `mpv` (config) | old desktop/media | `home/profiles/media/default.nix` | `programs.mpv` | + +**Note:** `unimatrix` is a terminal screensaver - fits well with media profile. + +--- + +## NOT Needed (Explicitly Removed) + +These packages should NOT be added: + +| Package | Reason | +|---------|--------| +| `wireguard-tools` | No longer needed | +| `wttrbar` | No longer needed | +| `nushellPlugins.skim` | No longer needed | + +--- + +## Tasks + +### Task 1: Update `home/base/cli-tools/default.nix` + +Add missing packages to the CLI tools aggregator: + +```nix +home.packages = with pkgs; [ + # Core utilities + jq ripgrep fd coreutils htop + # Dev tools + just lazylib lf tldr devenv + gcc go sqlite sqlite-vec + nix-index nix-update progress + # AI tools + comma fabric-ai llm + # Misc + libnotify basecamp hyprpaper-random + trash-cli unzip zip yazi +]; +``` + +Also add programs: carapace, zoxide, bat, direnv, eza, lf, zellij-ps + +### Task 2: Create `home/coding/packages.nix` + +New module for coding-specific packages: + +```nix +{ lib, pkgs, ... }: + +{ + options.coding.packages = { + enable = mkEnableOption "additional coding packages"; + }; + + config = mkIf config.coding.packages.enable { + home.packages = with pkgs; [ + bruno + insomnia + ]; + }; +} +``` + +### Task 3: Update `home/profiles/gaming/default.nix` + +Add GPU monitoring tools: + +```nix +home.packages = with pkgs; [ + # Gaming utilities + gamescope gamemode goverlay mangohud protonplus + # AMD GPU monitoring (ROCm) + rocmPackages.rocm-smi + rocmPackages.rocminfo + rocmPackages.rocm-runtime + vulkan-tools +]; +``` + +### Task 4: Update `home/profiles/media/default.nix` + +Add missing media packages: + +```nix +home.packages = with pkgs; [ + # Already present: ffmpeg_6-full, gimp, handbrake, etc. + # Add missing: + plexamp + webcord + unimatrix +]; + +programs.mpv = { + enable = true; + bindings = { + WHEEL_UP = "seek 10"; + WHEEL_DOWN = "seek -10"; + }; + config = { + profile = "gpu-hq"; + ytdl-format = "bestvideo+bestaudio"; + }; +}; +``` + +### Task 5: Update Desktop Apps + +Add desktop-specific packages to `home/desktop/apps/default.nix`: + +```nix +home.packages = with pkgs; [ + # Already present + # Add missing: + pomodoro-timer + # launch-timer - needs investigation +]; +``` + +### Task 6: Update Host Configs + +Ensure all desktop hosts import the new modules: + +- `home/m3tam3re/m3-ares.nix` - Should have `coding.packages.enable = true` +- `home/m3tam3re/m3-kratos.nix` - Should have `coding.packages.enable = true` + +--- + +## Implementation Order + +1. **Task 1** - Base CLI tools (largest impact, affects all hosts) +2. **Task 2** - Coding packages (small, new module) +3. **Task 3** - Gaming profile (ROCm) +4. **Task 4** - Media profile (plexamp, webcord, unimatrix, mpv) +5. **Task 5** - Desktop apps (vibetyper already present, add pomodoro-timer) +6. **Task 6** - Host config updates (if needed) + +--- + +## Verification + +```bash +nix flake check +# Should pass with no new errors +``` + +--- + +## Summary + +| Layer | New Files | Modified Files | +|-------|-----------|----------------| +| base/cli-tools | - | `default.nix` | +| coding | `packages.nix` | `default.nix` | +| profiles/gaming | - | `default.nix` | +| profiles/media | - | `default.nix` | +| desktop/apps | - | `default.nix` | + +**Total packages to restore:** ~30 +**Programs to restore:** 7 +**Packages excluded:** 3 (wireguard, wttrbar, nushellPlugins.skim) diff --git a/home/base/secrets/cli-tools/bat.nix b/home/base/secrets/cli-tools/bat.nix new file mode 100644 index 0000000..9a0e213 --- /dev/null +++ b/home/base/secrets/cli-tools/bat.nix @@ -0,0 +1,145 @@ +# Bat — cat replacement with nix-colors syntax highlighting theme. +{ + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.base.cliTools.bat; + palette = config.colorScheme.palette; +in { + # Enabled by default — base modules are always-on. + options.base.cliTools.bat.enable = (mkEnableOption "enable bat with nix-colors theme") // {default = true;}; + + config = mkIf cfg.enable { + programs.bat = { + enable = true; + config = {theme = "universal";}; + themes = { + universal = { + src = pkgs.writeText "universal.tmTheme" '' + + + + + name + Universal (nix-colors) + settings + + + settings + + background + #${palette.base00} + foreground + #${palette.base05} + caret + #${palette.base05} + selection + #${palette.base02} + selectionForeground + #${palette.base05} + lineHighlight + #${palette.base01} + + + + name + Comment + scope + comment + settings + + foreground + #${palette.base03} + fontStyle + italic + + + + name + String + scope + string + settings + + foreground + #${palette.base0A} + + + + name + Number + scope + constant.numeric + settings + + foreground + #${palette.base0E} + + + + name + Keyword + scope + keyword + settings + + foreground + #${palette.base08} + + + + name + Function + scope + entity.name.function + settings + + foreground + #${palette.base0B} + + + + name + Type + scope + entity.name.type, storage.type + settings + + foreground + #${palette.base0D} + + + + name + Variable + scope + variable + settings + + foreground + #${palette.base05} + + + + name + Constant + scope + constant + settings + + foreground + #${palette.base0E} + + + + + + ''; + }; + }; + }; + }; +} diff --git a/home/base/secrets/cli-tools/carapace.nix b/home/base/secrets/cli-tools/carapace.nix new file mode 100644 index 0000000..ea9194e --- /dev/null +++ b/home/base/secrets/cli-tools/carapace.nix @@ -0,0 +1,21 @@ +# Carapace — multi-shell completion engine with Fish, Nushell, and Bash integration. +{ + config, + lib, + ... +}: +with lib; let + cfg = config.base.cliTools.carapace; +in { + # Enabled by default — base modules are always-on. + options.base.cliTools.carapace.enable = (mkEnableOption "enable carapace completion engine") // {default = true;}; + + config = mkIf cfg.enable { + programs.carapace = { + enable = true; + enableFishIntegration = true; + enableNushellIntegration = true; + enableBashIntegration = true; + }; + }; +} diff --git a/home/base/secrets/cli-tools/default.nix b/home/base/secrets/cli-tools/default.nix new file mode 100644 index 0000000..3125597 --- /dev/null +++ b/home/base/secrets/cli-tools/default.nix @@ -0,0 +1,17 @@ +# CLI tools aggregator — imports all base command-line utilities. +{...}: { + imports = [ + ./bat.nix + ./carapace.nix + ./direnv.nix + ./eza.nix + ./fzf.nix + ./lf.nix + ./nitch.nix + ./packages.nix + ./television.nix + ./zellij.nix + ./zellij-ps.nix + ./zoxide.nix + ]; +} diff --git a/home/base/secrets/cli-tools/direnv.nix b/home/base/secrets/cli-tools/direnv.nix new file mode 100644 index 0000000..4ca206a --- /dev/null +++ b/home/base/secrets/cli-tools/direnv.nix @@ -0,0 +1,20 @@ +# Direnv — automatic environment loading with nix-direnv integration. +{ + config, + lib, + ... +}: +with lib; let + cfg = config.base.cliTools.direnv; +in { + # Enabled by default — base modules are always-on. + options.base.cliTools.direnv.enable = (mkEnableOption "enable direnv with nix-direnv") // {default = true;}; + + config = mkIf cfg.enable { + programs.direnv = { + enable = true; + enableNushellIntegration = true; + nix-direnv.enable = true; + }; + }; +} diff --git a/home/base/secrets/cli-tools/eza.nix b/home/base/secrets/cli-tools/eza.nix new file mode 100644 index 0000000..2e432a8 --- /dev/null +++ b/home/base/secrets/cli-tools/eza.nix @@ -0,0 +1,21 @@ +# Eza — modern ls replacement with icons, git status, and long format by default. +{ + config, + lib, + ... +}: +with lib; let + cfg = config.base.cliTools.eza; +in { + # Enabled by default — base modules are always-on. + options.base.cliTools.eza.enable = (mkEnableOption "enable eza modern ls replacement") // {default = true;}; + + config = mkIf cfg.enable { + programs.eza = { + enable = true; + enableFishIntegration = true; + enableBashIntegration = true; + extraOptions = ["-l" "--icons" "--git" "-a"]; + }; + }; +} diff --git a/home/base/secrets/cli-tools/fzf.nix b/home/base/secrets/cli-tools/fzf.nix new file mode 100644 index 0000000..4093298 --- /dev/null +++ b/home/base/secrets/cli-tools/fzf.nix @@ -0,0 +1,41 @@ +# Fuzzy finder with nix-colors palette and Wayland clipboard integration. +{ + config, + lib, + ... +}: +with lib; let + cfg = config.base.cliTools.fzf; +in { + # Enabled by default — base modules are always-on. + options.base.cliTools.fzf.enable = (mkEnableOption "enable fuzzy finder") // {default = true;}; + + config = mkIf cfg.enable { + programs.fzf = { + enable = true; + enableFishIntegration = true; + colors = { + "fg" = "#${config.colorScheme.palette.base05}"; + "bg" = "#${config.colorScheme.palette.base00}"; + "hl" = "#${config.colorScheme.palette.base0E}"; + "fg+" = "#${config.colorScheme.palette.base05}"; + "bg+" = "#${config.colorScheme.palette.base02}"; + "hl+" = "#${config.colorScheme.palette.base0E}"; + "info" = "#${config.colorScheme.palette.base09}"; + "prompt" = "#${config.colorScheme.palette.base0B}"; + "pointer" = "#${config.colorScheme.palette.base08}"; + "marker" = "#${config.colorScheme.palette.base08}"; + "spinner" = "#${config.colorScheme.palette.base09}"; + "header" = "#${config.colorScheme.palette.base03}"; + }; + defaultOptions = [ + "--preview='bat --color=always -n {}'" + "--bind 'ctrl-/:toggle-preview'" + "--header 'Press CTRL-Y to copy command into clipboard'" + "--bind 'ctrl-y:execute-silent(echo -n {2..} | wl-copy)+abort'" + ]; + defaultCommand = "fd --type f --exclude .git --follow --hidden"; + changeDirWidgetCommand = "fd --type d --exclude .git --follow --hidden"; + }; + }; +} diff --git a/home/base/secrets/cli-tools/lf.nix b/home/base/secrets/cli-tools/lf.nix new file mode 100644 index 0000000..50ff740 --- /dev/null +++ b/home/base/secrets/cli-tools/lf.nix @@ -0,0 +1,28 @@ +# Lf — terminal file manager with bat preview and Dracula theme. +{ + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.base.cliTools.lf; +in { + # Enabled by default — base modules are always-on. + options.base.cliTools.lf.enable = (mkEnableOption "enable lf terminal file manager") // {default = true;}; + + config = mkIf cfg.enable { + home.packages = [pkgs.lf]; + + programs.lf = { + enable = true; + settings = { + preview = true; + drawbox = true; + hidden = true; + icons = true; + previewer = "bat"; + }; + }; + }; +} diff --git a/home/base/secrets/cli-tools/nitch.nix b/home/base/secrets/cli-tools/nitch.nix new file mode 100644 index 0000000..eac4d62 --- /dev/null +++ b/home/base/secrets/cli-tools/nitch.nix @@ -0,0 +1,17 @@ +# Nitch — minimal system information display tool. +{ + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.base.cliTools.nitch; +in { + # Enabled by default — base modules are always-on. + options.base.cliTools.nitch.enable = (mkEnableOption "enable nitch") // {default = true;}; + + config = mkIf cfg.enable { + home.packages = [pkgs.nitch]; + }; +} diff --git a/home/base/secrets/cli-tools/packages.nix b/home/base/secrets/cli-tools/packages.nix new file mode 100644 index 0000000..fa226f4 --- /dev/null +++ b/home/base/secrets/cli-tools/packages.nix @@ -0,0 +1,54 @@ +# Essential CLI packages — core utilities always available on every host. +# NOTE: `lazylib` does not exist in nixpkgs. `lazygit` is the correct package +# (Git TUI) and is intentionally used here instead. +{ + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.base.cliTools.essentials; +in { + # Enabled by default — base modules are always-on. + options.base.cliTools.essentials.enable = (mkEnableOption "enable essential CLI packages") // {default = true;}; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ + # Core utilities + coreutils + fd + htop + jq + ripgrep + + # Dev tools + devenv + gcc + go + httpie + just + lazygit + nix-index + nix-update + progress + sqlite + sqlite-vec + tldr + + # AI tools + comma + fabric-ai + llm + + # Misc + basecamp + hyprpaper-random + libnotify + trash-cli + unzip + yazi + zip + ]; + }; +} diff --git a/home/base/secrets/cli-tools/television.nix b/home/base/secrets/cli-tools/television.nix new file mode 100644 index 0000000..3a74203 --- /dev/null +++ b/home/base/secrets/cli-tools/television.nix @@ -0,0 +1,60 @@ +# Television — fuzzy finder with custom channels for tldr, git-diff, and git-log. +{ + config, + lib, + ... +}: +with lib; let + cfg = config.base.cliTools.television; +in { + # Enabled by default — base modules are always-on. + options.base.cliTools.television.enable = (mkEnableOption "enable television") // {default = true;}; + + config = mkIf cfg.enable { + programs.television = { + enable = true; + channels = { + tldr = { + metadata = { + description = "Browse TLDR pages"; + name = "tldr"; + requirements = ["tldr"]; + }; + preview = { + command = "tldr '{}'"; + }; + source = { + command = "tldr --list"; + }; + }; + git-diff = { + metadata = { + description = "A channel to select files from git diff commands"; + name = "git-diff"; + requirements = ["git"]; + }; + preview = { + command = "git diff HEAD --color=always -- '{}'"; + }; + source = { + command = "git diff --name-only HEAD"; + }; + }; + git-log = { + metadata = { + description = "A channel to select from git log entries"; + name = "git-log"; + requirements = ["git"]; + }; + preview = { + command = "git show -p --stat --pretty=fuller --color=always '{0}'"; + }; + source = { + command = "git log --oneline --date=short --pretty=\"format:%h %s %an %cd\" \"$@\""; + output = "{split: :0}"; + }; + }; + }; + }; + }; +} diff --git a/home/base/secrets/cli-tools/zellij-ps.nix b/home/base/secrets/cli-tools/zellij-ps.nix new file mode 100644 index 0000000..8dac702 --- /dev/null +++ b/home/base/secrets/cli-tools/zellij-ps.nix @@ -0,0 +1,30 @@ +# Zellij-ps — project-aware Zellij session manager from m3ta-nixpkgs. +# Delegates to `cli.zellij-ps` — the home-manager module namespace provided by +# m3ta-nixpkgs (inputs.m3ta-nixpkgs.nixosModules.default). This is intentional; +# `cli.*` is the convention used by m3ta-nixpkgs home-manager modules. +{ + config, + lib, + ... +}: +with lib; let + cfg = config.base.cliTools.zellijPs; +in { + options.base.cliTools.zellijPs = { + # Enabled by default — base modules are always-on. + enable = (mkEnableOption "enable zellij-ps project session manager") // {default = true;}; + + projectFolders = mkOption { + type = types.listOf types.path; + description = "Project root folders scanned by zellij-ps."; + default = ["${config.home.homeDirectory}/p"]; + }; + }; + + config = mkIf cfg.enable { + cli.zellij-ps = { + enable = true; + projectFolders = cfg.projectFolders; + }; + }; +} diff --git a/home/base/secrets/cli-tools/zellij.nix b/home/base/secrets/cli-tools/zellij.nix new file mode 100644 index 0000000..efe2c6c --- /dev/null +++ b/home/base/secrets/cli-tools/zellij.nix @@ -0,0 +1,34 @@ +# Zellij terminal multiplexer with nix-colors theming. +{ + config, + lib, + ... +}: +with lib; let + cfg = config.base.cliTools.zellij; +in { + # Enabled by default — base modules are always-on. + options.base.cliTools.zellij.enable = (mkEnableOption "enable zellij multiplexer") // {default = true;}; + + config = mkIf cfg.enable { + programs.zellij = { + enable = true; + settings = { + theme = "universal"; + themes.universal = { + bg = "#${config.colorScheme.palette.base00}"; + fg = "#${config.colorScheme.palette.base05}"; + black = "#${config.colorScheme.palette.base01}"; + red = "#${config.colorScheme.palette.base08}"; + green = "#${config.colorScheme.palette.base0B}"; + yellow = "#${config.colorScheme.palette.base0A}"; + blue = "#${config.colorScheme.palette.base0D}"; + magenta = "#${config.colorScheme.palette.base0E}"; + cyan = "#${config.colorScheme.palette.base0C}"; + white = "#${config.colorScheme.palette.base07}"; + orange = "#${config.colorScheme.palette.base09}"; + }; + }; + }; + }; +} diff --git a/home/base/secrets/cli-tools/zoxide.nix b/home/base/secrets/cli-tools/zoxide.nix new file mode 100644 index 0000000..bc3e80e --- /dev/null +++ b/home/base/secrets/cli-tools/zoxide.nix @@ -0,0 +1,20 @@ +# Zoxide — smarter cd with Fish and Nushell integration. +{ + config, + lib, + ... +}: +with lib; let + cfg = config.base.cliTools.zoxide; +in { + # Enabled by default — base modules are always-on. + options.base.cliTools.zoxide.enable = (mkEnableOption "enable zoxide smarter cd") // {default = true;}; + + config = mkIf cfg.enable { + programs.zoxide = { + enable = true; + enableFishIntegration = true; + enableNushellIntegration = true; + }; + }; +} diff --git a/home/coding/default.nix b/home/coding/default.nix index 11c433c..04c836d 100644 --- a/home/coding/default.nix +++ b/home/coding/default.nix @@ -1,10 +1,11 @@ # Coding environment aggregator — profile-independent development tooling. -# Imports editors, LSP servers, git configuration, and the agent system. +# Imports editors, LSP servers, git configuration, the agent system, and optional packages. {...}: { imports = [ ./editor ./lsp ./git/git.nix ./agents/agents.nix + ./packages.nix ]; } diff --git a/home/coding/packages.nix b/home/coding/packages.nix new file mode 100644 index 0000000..2501cd6 --- /dev/null +++ b/home/coding/packages.nix @@ -0,0 +1,20 @@ +# Additional coding packages — API clients and GUI development tools. +# Opt-in since not all coding hosts need these desktop-oriented tools. +{ + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.coding.packages; +in { + options.coding.packages.enable = mkEnableOption "additional coding packages (bruno, insomnia)"; + + config = mkIf cfg.enable { + home.packages = [ + pkgs.bruno + pkgs.insomnia + ]; + }; +} diff --git a/home/m3tam3re/m3-ares.nix b/home/m3tam3re/m3-ares.nix index 4cdfb3b..e336286 100644 --- a/home/m3tam3re/m3-ares.nix +++ b/home/m3tam3re/m3-ares.nix @@ -58,6 +58,7 @@ in zed.enable = true; }; lsp.enable = true; + packages.enable = true; }; # Gaming profile features From 6d0149ee6ee4989cfe66db92d8260d5e88c27590 Mon Sep 17 00:00:00 2001 From: m3tm3re Date: Sun, 26 Apr 2026 12:32:47 +0200 Subject: [PATCH 12/13] feat: add AMD GPU tools, media packages, and productivity module Task 3 - Gaming profile: - Add gpu.nix with ROCm runtime/smi/info and vulkan-tools - Import gpu.nix in gaming profile aggregator Task 4 - Media profile: - Add unimatrix to yt-dlp.nix packages - (plexamp, webcord, mpv config were already present) Task 5 - Desktop apps: - Add productivity.nix with pomodoro-timer - Import productivity.nix in desktop apps aggregator --- home/desktop/apps/default.nix | 3 ++- home/desktop/apps/productivity.nix | 18 ++++++++++++++++++ home/profiles/gaming/default.nix | 3 ++- home/profiles/gaming/gpu.nix | 21 +++++++++++++++++++++ home/profiles/media/yt-dlp.nix | 1 + 5 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 home/desktop/apps/productivity.nix create mode 100644 home/profiles/gaming/gpu.nix diff --git a/home/desktop/apps/default.nix b/home/desktop/apps/default.nix index 05fb046..0888cfc 100644 --- a/home/desktop/apps/default.nix +++ b/home/desktop/apps/default.nix @@ -1,9 +1,10 @@ -# Desktop apps aggregator — Obsidian, Office, web apps, and crypto tools. +# Desktop apps aggregator — Obsidian, Office, web apps, crypto tools, and productivity. {...}: { imports = [ ./obsidian.nix ./office.nix ./webapps.nix ./crypto.nix + ./productivity.nix ]; } diff --git a/home/desktop/apps/productivity.nix b/home/desktop/apps/productivity.nix new file mode 100644 index 0000000..dd0c134 --- /dev/null +++ b/home/desktop/apps/productivity.nix @@ -0,0 +1,18 @@ +# Productivity tools — Pomodoro timer and focus utilities. +{ + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.desktop.apps.productivity; +in { + options.desktop.apps.productivity.enable = mkEnableOption "enable productivity tools"; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ + pomodoro-timer + ]; + }; +} diff --git a/home/profiles/gaming/default.nix b/home/profiles/gaming/default.nix index e1d0e47..7b1f663 100644 --- a/home/profiles/gaming/default.nix +++ b/home/profiles/gaming/default.nix @@ -1,7 +1,8 @@ -# Gaming profile aggregator — Steam platform and Gamescope session support. +# Gaming profile aggregator — Steam platform, Gamescope session, and AMD GPU tools. {...}: { imports = [ ./steam.nix ./gamescope.nix + ./gpu.nix ]; } diff --git a/home/profiles/gaming/gpu.nix b/home/profiles/gaming/gpu.nix new file mode 100644 index 0000000..ad8c85c --- /dev/null +++ b/home/profiles/gaming/gpu.nix @@ -0,0 +1,21 @@ +# AMD GPU tools — ROCm runtime, monitoring, and Vulkan utilities for gaming. +{ + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.profiles.gaming.gpu; +in { + options.profiles.gaming.gpu.enable = mkEnableOption "enable AMD GPU tools"; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ + rocmPackages.rocm-runtime + rocmPackages.rocm-smi + rocmPackages.rocminfo + vulkan-tools + ]; + }; +} diff --git a/home/profiles/media/yt-dlp.nix b/home/profiles/media/yt-dlp.nix index 982f585..5c9e088 100644 --- a/home/profiles/media/yt-dlp.nix +++ b/home/profiles/media/yt-dlp.nix @@ -13,6 +13,7 @@ in { config = mkIf cfg.enable { home.packages = with pkgs; [ plexamp + unimatrix webcord ]; From 30a9a23de288cfde54a153759a00121175eaa65d Mon Sep 17 00:00:00 2001 From: m3tm3re Date: Sun, 26 Apr 2026 13:20:22 +0200 Subject: [PATCH 13/13] refactor: add language runtimes module and cleanup agent config - Add home/coding/languages/ with Python, JavaScript, Rust, Go, TypeScript - Move bun/nodejs from agents.nix to languages/javascript.nix - Move python3 with packages to languages/python.nix - Move npm config to javascript.nix (broader context) - Add language options to m3-ares and m3-kratos host configs - Move pyrefly from agents.nix to lsp/servers.nix - Remove duplicate python3 reference (build conflict fix) - Remove unused base/secrets/cli-tools/ duplicates --- home/base/cli-tools/packages.nix | 14 +- home/base/secrets/cli-tools/bat.nix | 145 --------------------- home/base/secrets/cli-tools/carapace.nix | 21 --- home/base/secrets/cli-tools/default.nix | 17 --- home/base/secrets/cli-tools/direnv.nix | 20 --- home/base/secrets/cli-tools/eza.nix | 21 --- home/base/secrets/cli-tools/fzf.nix | 41 ------ home/base/secrets/cli-tools/lf.nix | 28 ---- home/base/secrets/cli-tools/nitch.nix | 17 --- home/base/secrets/cli-tools/packages.nix | 54 -------- home/base/secrets/cli-tools/television.nix | 60 --------- home/base/secrets/cli-tools/zellij-ps.nix | 30 ----- home/base/secrets/cli-tools/zellij.nix | 34 ----- home/base/secrets/cli-tools/zoxide.nix | 20 --- home/coding/agents/agents.nix | 33 +---- home/coding/agents/pi.nix | 1 - home/coding/default.nix | 3 +- home/coding/languages/default.nix | 10 ++ home/coding/languages/go.nix | 19 +++ home/coding/languages/javascript.nix | 25 ++++ home/coding/languages/python.nix | 30 +++++ home/coding/languages/rust-toolchain.nix | 20 +++ home/coding/languages/typescript.nix | 19 +++ home/coding/lsp/servers.nix | 1 + home/m3tam3re/m3-ares.nix | 7 + home/m3tam3re/m3-kratos.nix | 7 + 26 files changed, 152 insertions(+), 545 deletions(-) delete mode 100644 home/base/secrets/cli-tools/bat.nix delete mode 100644 home/base/secrets/cli-tools/carapace.nix delete mode 100644 home/base/secrets/cli-tools/default.nix delete mode 100644 home/base/secrets/cli-tools/direnv.nix delete mode 100644 home/base/secrets/cli-tools/eza.nix delete mode 100644 home/base/secrets/cli-tools/fzf.nix delete mode 100644 home/base/secrets/cli-tools/lf.nix delete mode 100644 home/base/secrets/cli-tools/nitch.nix delete mode 100644 home/base/secrets/cli-tools/packages.nix delete mode 100644 home/base/secrets/cli-tools/television.nix delete mode 100644 home/base/secrets/cli-tools/zellij-ps.nix delete mode 100644 home/base/secrets/cli-tools/zellij.nix delete mode 100644 home/base/secrets/cli-tools/zoxide.nix create mode 100644 home/coding/languages/default.nix create mode 100644 home/coding/languages/go.nix create mode 100644 home/coding/languages/javascript.nix create mode 100644 home/coding/languages/python.nix create mode 100644 home/coding/languages/rust-toolchain.nix create mode 100644 home/coding/languages/typescript.nix diff --git a/home/base/cli-tools/packages.nix b/home/base/cli-tools/packages.nix index fa226f4..aee3c41 100644 --- a/home/base/cli-tools/packages.nix +++ b/home/base/cli-tools/packages.nix @@ -22,22 +22,30 @@ in { jq ripgrep + # Nix + alejandra + comma + nixd + nix-diff + nix-index + nix-update + # Dev tools + bc + cmake devenv gcc + gnumake go httpie just lazygit - nix-index - nix-update progress sqlite sqlite-vec tldr # AI tools - comma fabric-ai llm diff --git a/home/base/secrets/cli-tools/bat.nix b/home/base/secrets/cli-tools/bat.nix deleted file mode 100644 index 9a0e213..0000000 --- a/home/base/secrets/cli-tools/bat.nix +++ /dev/null @@ -1,145 +0,0 @@ -# Bat — cat replacement with nix-colors syntax highlighting theme. -{ - config, - lib, - pkgs, - ... -}: -with lib; let - cfg = config.base.cliTools.bat; - palette = config.colorScheme.palette; -in { - # Enabled by default — base modules are always-on. - options.base.cliTools.bat.enable = (mkEnableOption "enable bat with nix-colors theme") // {default = true;}; - - config = mkIf cfg.enable { - programs.bat = { - enable = true; - config = {theme = "universal";}; - themes = { - universal = { - src = pkgs.writeText "universal.tmTheme" '' - - - - - name - Universal (nix-colors) - settings - - - settings - - background - #${palette.base00} - foreground - #${palette.base05} - caret - #${palette.base05} - selection - #${palette.base02} - selectionForeground - #${palette.base05} - lineHighlight - #${palette.base01} - - - - name - Comment - scope - comment - settings - - foreground - #${palette.base03} - fontStyle - italic - - - - name - String - scope - string - settings - - foreground - #${palette.base0A} - - - - name - Number - scope - constant.numeric - settings - - foreground - #${palette.base0E} - - - - name - Keyword - scope - keyword - settings - - foreground - #${palette.base08} - - - - name - Function - scope - entity.name.function - settings - - foreground - #${palette.base0B} - - - - name - Type - scope - entity.name.type, storage.type - settings - - foreground - #${palette.base0D} - - - - name - Variable - scope - variable - settings - - foreground - #${palette.base05} - - - - name - Constant - scope - constant - settings - - foreground - #${palette.base0E} - - - - - - ''; - }; - }; - }; - }; -} diff --git a/home/base/secrets/cli-tools/carapace.nix b/home/base/secrets/cli-tools/carapace.nix deleted file mode 100644 index ea9194e..0000000 --- a/home/base/secrets/cli-tools/carapace.nix +++ /dev/null @@ -1,21 +0,0 @@ -# Carapace — multi-shell completion engine with Fish, Nushell, and Bash integration. -{ - config, - lib, - ... -}: -with lib; let - cfg = config.base.cliTools.carapace; -in { - # Enabled by default — base modules are always-on. - options.base.cliTools.carapace.enable = (mkEnableOption "enable carapace completion engine") // {default = true;}; - - config = mkIf cfg.enable { - programs.carapace = { - enable = true; - enableFishIntegration = true; - enableNushellIntegration = true; - enableBashIntegration = true; - }; - }; -} diff --git a/home/base/secrets/cli-tools/default.nix b/home/base/secrets/cli-tools/default.nix deleted file mode 100644 index 3125597..0000000 --- a/home/base/secrets/cli-tools/default.nix +++ /dev/null @@ -1,17 +0,0 @@ -# CLI tools aggregator — imports all base command-line utilities. -{...}: { - imports = [ - ./bat.nix - ./carapace.nix - ./direnv.nix - ./eza.nix - ./fzf.nix - ./lf.nix - ./nitch.nix - ./packages.nix - ./television.nix - ./zellij.nix - ./zellij-ps.nix - ./zoxide.nix - ]; -} diff --git a/home/base/secrets/cli-tools/direnv.nix b/home/base/secrets/cli-tools/direnv.nix deleted file mode 100644 index 4ca206a..0000000 --- a/home/base/secrets/cli-tools/direnv.nix +++ /dev/null @@ -1,20 +0,0 @@ -# Direnv — automatic environment loading with nix-direnv integration. -{ - config, - lib, - ... -}: -with lib; let - cfg = config.base.cliTools.direnv; -in { - # Enabled by default — base modules are always-on. - options.base.cliTools.direnv.enable = (mkEnableOption "enable direnv with nix-direnv") // {default = true;}; - - config = mkIf cfg.enable { - programs.direnv = { - enable = true; - enableNushellIntegration = true; - nix-direnv.enable = true; - }; - }; -} diff --git a/home/base/secrets/cli-tools/eza.nix b/home/base/secrets/cli-tools/eza.nix deleted file mode 100644 index 2e432a8..0000000 --- a/home/base/secrets/cli-tools/eza.nix +++ /dev/null @@ -1,21 +0,0 @@ -# Eza — modern ls replacement with icons, git status, and long format by default. -{ - config, - lib, - ... -}: -with lib; let - cfg = config.base.cliTools.eza; -in { - # Enabled by default — base modules are always-on. - options.base.cliTools.eza.enable = (mkEnableOption "enable eza modern ls replacement") // {default = true;}; - - config = mkIf cfg.enable { - programs.eza = { - enable = true; - enableFishIntegration = true; - enableBashIntegration = true; - extraOptions = ["-l" "--icons" "--git" "-a"]; - }; - }; -} diff --git a/home/base/secrets/cli-tools/fzf.nix b/home/base/secrets/cli-tools/fzf.nix deleted file mode 100644 index 4093298..0000000 --- a/home/base/secrets/cli-tools/fzf.nix +++ /dev/null @@ -1,41 +0,0 @@ -# Fuzzy finder with nix-colors palette and Wayland clipboard integration. -{ - config, - lib, - ... -}: -with lib; let - cfg = config.base.cliTools.fzf; -in { - # Enabled by default — base modules are always-on. - options.base.cliTools.fzf.enable = (mkEnableOption "enable fuzzy finder") // {default = true;}; - - config = mkIf cfg.enable { - programs.fzf = { - enable = true; - enableFishIntegration = true; - colors = { - "fg" = "#${config.colorScheme.palette.base05}"; - "bg" = "#${config.colorScheme.palette.base00}"; - "hl" = "#${config.colorScheme.palette.base0E}"; - "fg+" = "#${config.colorScheme.palette.base05}"; - "bg+" = "#${config.colorScheme.palette.base02}"; - "hl+" = "#${config.colorScheme.palette.base0E}"; - "info" = "#${config.colorScheme.palette.base09}"; - "prompt" = "#${config.colorScheme.palette.base0B}"; - "pointer" = "#${config.colorScheme.palette.base08}"; - "marker" = "#${config.colorScheme.palette.base08}"; - "spinner" = "#${config.colorScheme.palette.base09}"; - "header" = "#${config.colorScheme.palette.base03}"; - }; - defaultOptions = [ - "--preview='bat --color=always -n {}'" - "--bind 'ctrl-/:toggle-preview'" - "--header 'Press CTRL-Y to copy command into clipboard'" - "--bind 'ctrl-y:execute-silent(echo -n {2..} | wl-copy)+abort'" - ]; - defaultCommand = "fd --type f --exclude .git --follow --hidden"; - changeDirWidgetCommand = "fd --type d --exclude .git --follow --hidden"; - }; - }; -} diff --git a/home/base/secrets/cli-tools/lf.nix b/home/base/secrets/cli-tools/lf.nix deleted file mode 100644 index 50ff740..0000000 --- a/home/base/secrets/cli-tools/lf.nix +++ /dev/null @@ -1,28 +0,0 @@ -# Lf — terminal file manager with bat preview and Dracula theme. -{ - config, - lib, - pkgs, - ... -}: -with lib; let - cfg = config.base.cliTools.lf; -in { - # Enabled by default — base modules are always-on. - options.base.cliTools.lf.enable = (mkEnableOption "enable lf terminal file manager") // {default = true;}; - - config = mkIf cfg.enable { - home.packages = [pkgs.lf]; - - programs.lf = { - enable = true; - settings = { - preview = true; - drawbox = true; - hidden = true; - icons = true; - previewer = "bat"; - }; - }; - }; -} diff --git a/home/base/secrets/cli-tools/nitch.nix b/home/base/secrets/cli-tools/nitch.nix deleted file mode 100644 index eac4d62..0000000 --- a/home/base/secrets/cli-tools/nitch.nix +++ /dev/null @@ -1,17 +0,0 @@ -# Nitch — minimal system information display tool. -{ - config, - lib, - pkgs, - ... -}: -with lib; let - cfg = config.base.cliTools.nitch; -in { - # Enabled by default — base modules are always-on. - options.base.cliTools.nitch.enable = (mkEnableOption "enable nitch") // {default = true;}; - - config = mkIf cfg.enable { - home.packages = [pkgs.nitch]; - }; -} diff --git a/home/base/secrets/cli-tools/packages.nix b/home/base/secrets/cli-tools/packages.nix deleted file mode 100644 index fa226f4..0000000 --- a/home/base/secrets/cli-tools/packages.nix +++ /dev/null @@ -1,54 +0,0 @@ -# Essential CLI packages — core utilities always available on every host. -# NOTE: `lazylib` does not exist in nixpkgs. `lazygit` is the correct package -# (Git TUI) and is intentionally used here instead. -{ - config, - lib, - pkgs, - ... -}: -with lib; let - cfg = config.base.cliTools.essentials; -in { - # Enabled by default — base modules are always-on. - options.base.cliTools.essentials.enable = (mkEnableOption "enable essential CLI packages") // {default = true;}; - - config = mkIf cfg.enable { - home.packages = with pkgs; [ - # Core utilities - coreutils - fd - htop - jq - ripgrep - - # Dev tools - devenv - gcc - go - httpie - just - lazygit - nix-index - nix-update - progress - sqlite - sqlite-vec - tldr - - # AI tools - comma - fabric-ai - llm - - # Misc - basecamp - hyprpaper-random - libnotify - trash-cli - unzip - yazi - zip - ]; - }; -} diff --git a/home/base/secrets/cli-tools/television.nix b/home/base/secrets/cli-tools/television.nix deleted file mode 100644 index 3a74203..0000000 --- a/home/base/secrets/cli-tools/television.nix +++ /dev/null @@ -1,60 +0,0 @@ -# Television — fuzzy finder with custom channels for tldr, git-diff, and git-log. -{ - config, - lib, - ... -}: -with lib; let - cfg = config.base.cliTools.television; -in { - # Enabled by default — base modules are always-on. - options.base.cliTools.television.enable = (mkEnableOption "enable television") // {default = true;}; - - config = mkIf cfg.enable { - programs.television = { - enable = true; - channels = { - tldr = { - metadata = { - description = "Browse TLDR pages"; - name = "tldr"; - requirements = ["tldr"]; - }; - preview = { - command = "tldr '{}'"; - }; - source = { - command = "tldr --list"; - }; - }; - git-diff = { - metadata = { - description = "A channel to select files from git diff commands"; - name = "git-diff"; - requirements = ["git"]; - }; - preview = { - command = "git diff HEAD --color=always -- '{}'"; - }; - source = { - command = "git diff --name-only HEAD"; - }; - }; - git-log = { - metadata = { - description = "A channel to select from git log entries"; - name = "git-log"; - requirements = ["git"]; - }; - preview = { - command = "git show -p --stat --pretty=fuller --color=always '{0}'"; - }; - source = { - command = "git log --oneline --date=short --pretty=\"format:%h %s %an %cd\" \"$@\""; - output = "{split: :0}"; - }; - }; - }; - }; - }; -} diff --git a/home/base/secrets/cli-tools/zellij-ps.nix b/home/base/secrets/cli-tools/zellij-ps.nix deleted file mode 100644 index 8dac702..0000000 --- a/home/base/secrets/cli-tools/zellij-ps.nix +++ /dev/null @@ -1,30 +0,0 @@ -# Zellij-ps — project-aware Zellij session manager from m3ta-nixpkgs. -# Delegates to `cli.zellij-ps` — the home-manager module namespace provided by -# m3ta-nixpkgs (inputs.m3ta-nixpkgs.nixosModules.default). This is intentional; -# `cli.*` is the convention used by m3ta-nixpkgs home-manager modules. -{ - config, - lib, - ... -}: -with lib; let - cfg = config.base.cliTools.zellijPs; -in { - options.base.cliTools.zellijPs = { - # Enabled by default — base modules are always-on. - enable = (mkEnableOption "enable zellij-ps project session manager") // {default = true;}; - - projectFolders = mkOption { - type = types.listOf types.path; - description = "Project root folders scanned by zellij-ps."; - default = ["${config.home.homeDirectory}/p"]; - }; - }; - - config = mkIf cfg.enable { - cli.zellij-ps = { - enable = true; - projectFolders = cfg.projectFolders; - }; - }; -} diff --git a/home/base/secrets/cli-tools/zellij.nix b/home/base/secrets/cli-tools/zellij.nix deleted file mode 100644 index efe2c6c..0000000 --- a/home/base/secrets/cli-tools/zellij.nix +++ /dev/null @@ -1,34 +0,0 @@ -# Zellij terminal multiplexer with nix-colors theming. -{ - config, - lib, - ... -}: -with lib; let - cfg = config.base.cliTools.zellij; -in { - # Enabled by default — base modules are always-on. - options.base.cliTools.zellij.enable = (mkEnableOption "enable zellij multiplexer") // {default = true;}; - - config = mkIf cfg.enable { - programs.zellij = { - enable = true; - settings = { - theme = "universal"; - themes.universal = { - bg = "#${config.colorScheme.palette.base00}"; - fg = "#${config.colorScheme.palette.base05}"; - black = "#${config.colorScheme.palette.base01}"; - red = "#${config.colorScheme.palette.base08}"; - green = "#${config.colorScheme.palette.base0B}"; - yellow = "#${config.colorScheme.palette.base0A}"; - blue = "#${config.colorScheme.palette.base0D}"; - magenta = "#${config.colorScheme.palette.base0E}"; - cyan = "#${config.colorScheme.palette.base0C}"; - white = "#${config.colorScheme.palette.base07}"; - orange = "#${config.colorScheme.palette.base09}"; - }; - }; - }; - }; -} diff --git a/home/base/secrets/cli-tools/zoxide.nix b/home/base/secrets/cli-tools/zoxide.nix deleted file mode 100644 index bc3e80e..0000000 --- a/home/base/secrets/cli-tools/zoxide.nix +++ /dev/null @@ -1,20 +0,0 @@ -# Zoxide — smarter cd with Fish and Nushell integration. -{ - config, - lib, - ... -}: -with lib; let - cfg = config.base.cliTools.zoxide; -in { - # Enabled by default — base modules are always-on. - options.base.cliTools.zoxide.enable = (mkEnableOption "enable zoxide smarter cd") // {default = true;}; - - config = mkIf cfg.enable { - programs.zoxide = { - enable = true; - enableFishIntegration = true; - enableNushellIntegration = true; - }; - }; -} diff --git a/home/coding/agents/agents.nix b/home/coding/agents/agents.nix index acd840f..8bb37f0 100644 --- a/home/coding/agents/agents.nix +++ b/home/coding/agents/agents.nix @@ -8,15 +8,7 @@ pkgs, videoDrivers ? [], ... -}: -with lib; let - npmGlobalPrefix = "${config.home.homeDirectory}/.npm-global"; -in { - home.file.".npmrc".text = '' - prefix=${npmGlobalPrefix} - ''; - home.sessionVariables.NPM_CONFIG_PREFIX = npmGlobalPrefix; - +}: { imports = [ # OpenCode and Pi agent configurations ./opencode.nix @@ -70,35 +62,12 @@ in { home.packages = with pkgs; [ agenix-cli agent-browser - alejandra - bc - bun - devpod - gnumake - cmake - (python3.withPackages (ps: - with ps; [ - pip - uv - numba - numpy - torch - srt - ])) pyrefly - nixd - nix-update - nodejs (qmd.override { vulkanSupport = videoDrivers == ["amdgpu"]; cudaSupport = videoDrivers == ["nvidia"]; }) openshell openspec - pi-coding-agent - sidecar - tailwindcss - tailwindcss-language-server - td ]; } diff --git a/home/coding/agents/pi.nix b/home/coding/agents/pi.nix index 9de9b26..2f431ea 100644 --- a/home/coding/agents/pi.nix +++ b/home/coding/agents/pi.nix @@ -41,7 +41,6 @@ "npm:@plannotator/pi-extension" "npm:pi-powerline-footer" "npm:pi-markdown-preview" - "npm:pi-gsd" "npm:pi-tool-display" "npm:pi-agent-browser-native" "git:github.com/hk-vk/pi-connect" diff --git a/home/coding/default.nix b/home/coding/default.nix index 04c836d..7420578 100644 --- a/home/coding/default.nix +++ b/home/coding/default.nix @@ -1,11 +1,12 @@ # Coding environment aggregator — profile-independent development tooling. -# Imports editors, LSP servers, git configuration, the agent system, and optional packages. +# Imports editors, LSP servers, git configuration, the agent system, language runtimes, and optional packages. {...}: { imports = [ ./editor ./lsp ./git/git.nix ./agents/agents.nix + ./languages ./packages.nix ]; } diff --git a/home/coding/languages/default.nix b/home/coding/languages/default.nix new file mode 100644 index 0000000..586848d --- /dev/null +++ b/home/coding/languages/default.nix @@ -0,0 +1,10 @@ +# Language runtimes — Python, JavaScript, Rust, Go, TypeScript. +{...}: { + imports = [ + ./python.nix + ./javascript.nix + ./rust-toolchain.nix + ./go.nix + ./typescript.nix + ]; +} diff --git a/home/coding/languages/go.nix b/home/coding/languages/go.nix new file mode 100644 index 0000000..c373f59 --- /dev/null +++ b/home/coding/languages/go.nix @@ -0,0 +1,19 @@ +# Go toolchain — compiler and language server. +{ + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.coding.languages.go; +in { + options.coding.languages.go.enable = mkEnableOption "Go toolchain"; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ + go + gopls + ]; + }; +} diff --git a/home/coding/languages/javascript.nix b/home/coding/languages/javascript.nix new file mode 100644 index 0000000..86ccf2e --- /dev/null +++ b/home/coding/languages/javascript.nix @@ -0,0 +1,25 @@ +# JavaScript/TypeScript runtime — Node.js and Bun. +{ + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.coding.languages.javascript; + npmGlobalPrefix = "${config.home.homeDirectory}/.npm-global"; +in { + options.coding.languages.javascript.enable = mkEnableOption "JavaScript runtime (Node.js + Bun)"; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ + nodejs + bun + ]; + + home.file.".npmrc".text = '' + prefix=${npmGlobalPrefix} + ''; + home.sessionVariables.NPM_CONFIG_PREFIX = npmGlobalPrefix; + }; +} diff --git a/home/coding/languages/python.nix b/home/coding/languages/python.nix new file mode 100644 index 0000000..11bb67f --- /dev/null +++ b/home/coding/languages/python.nix @@ -0,0 +1,30 @@ +# Python runtime with pip and uv. +{ + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.coding.languages.python; +in { + options.coding.languages.python = { + enable = mkEnableOption "Python runtime with pip and uv"; + extraPackages = mkOption { + type = types.listOf types.package; + default = []; + example = literalExpression "[ pkgs.python3Packages.numpy ]"; + description = "Additional Python packages to include"; + }; + }; + + config = mkIf cfg.enable { + home.packages = [ + (pkgs.python3.withPackages (ps: + with ps; [ + pip + uv + ] ++ cfg.extraPackages)) + ]; + }; +} diff --git a/home/coding/languages/rust-toolchain.nix b/home/coding/languages/rust-toolchain.nix new file mode 100644 index 0000000..823a28c --- /dev/null +++ b/home/coding/languages/rust-toolchain.nix @@ -0,0 +1,20 @@ +# Rust toolchain — compiler, package manager, and language server. +{ + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.coding.languages.rustToolchain; +in { + options.coding.languages.rustToolchain.enable = mkEnableOption "Rust toolchain"; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ + rustc + cargo + rust-analyzer + ]; + }; +} diff --git a/home/coding/languages/typescript.nix b/home/coding/languages/typescript.nix new file mode 100644 index 0000000..58a791e --- /dev/null +++ b/home/coding/languages/typescript.nix @@ -0,0 +1,19 @@ +# TypeScript support — language server and type checking tools. +{ + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.coding.languages.typescript; +in { + options.coding.languages.typescript.enable = mkEnableOption "TypeScript support"; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ + typescript + typescript-language-server + ]; + }; +} diff --git a/home/coding/lsp/servers.nix b/home/coding/lsp/servers.nix index 0e01947..77bc732 100644 --- a/home/coding/lsp/servers.nix +++ b/home/coding/lsp/servers.nix @@ -17,6 +17,7 @@ in { # General typescript-language-server tailwindcss-language-server + pyrefly ]; }; } diff --git a/home/m3tam3re/m3-ares.nix b/home/m3tam3re/m3-ares.nix index e336286..a1d1cfe 100644 --- a/home/m3tam3re/m3-ares.nix +++ b/home/m3tam3re/m3-ares.nix @@ -59,6 +59,13 @@ in }; lsp.enable = true; packages.enable = true; + languages = { + python.enable = true; + javascript.enable = true; + rustToolchain.enable = true; + go.enable = true; + typescript.enable = true; + }; }; # Gaming profile features diff --git a/home/m3tam3re/m3-kratos.nix b/home/m3tam3re/m3-kratos.nix index 333bbbd..5f01fbf 100644 --- a/home/m3tam3re/m3-kratos.nix +++ b/home/m3tam3re/m3-kratos.nix @@ -57,6 +57,13 @@ in zed.enable = true; }; lsp.enable = true; + languages = { + python.enable = true; + javascript.enable = true; + rustToolchain.enable = true; + go.enable = true; + typescript.enable = true; + }; }; # Gaming profile features