From 7dc7900c313f86c4777218a026a4b513a207cc03 Mon Sep 17 00:00:00 2001 From: UnstoppableMango Date: Sat, 11 Jul 2026 23:29:08 -0500 Subject: [PATCH 1/2] Begin cleaning up modules --- AGENTS.md | 9 +- users/erik/ai.nix => ai/default.nix | 1 + desktops/default.nix | 3 - desktops/gnome/default.nix | 76 ---------------- users/erik/gnupg.nix => gnupg/default.nix | 4 +- shells/zsh/default.nix | 5 +- shells/zsh/oh-my-zsh/default.nix | 8 +- toolchain/git/default.nix | 103 ++++++++++++---------- toolchain/nix/default.nix | 23 +++-- users/erasmussen/default.nix | 13 ++- users/erasmussen/gnupg.nix | 8 -- users/erik/default.nix | 9 +- 12 files changed, 101 insertions(+), 161 deletions(-) rename users/erik/ai.nix => ai/default.nix (99%) delete mode 100644 desktops/default.nix delete mode 100644 desktops/gnome/default.nix rename users/erik/gnupg.nix => gnupg/default.nix (77%) delete mode 100644 users/erasmussen/gnupg.nix diff --git a/AGENTS.md b/AGENTS.md index f94dbce..fcb9d05 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -30,15 +30,18 @@ CI runs `nix flake check --all-systems` then builds the `erik@darter` home confi The flake uses `flake-parts` with these categorical module directories imported as `flake.modules.flake`: +- `ai/` — claude-code, github-copilot-cli, cursor-cli (shared by both users) - `browsers/` — Brave -- `desktops/` — GNOME - `editors/` — VS Code (with profiles per host), Neovim (via nixvim), Zed, Helix, Emacs -- `shells/` — Zsh (Prezto + Powerlevel10k) +- `gnupg/` — gpg + gpg-agent (shared by both users; pinentry only on Linux) +- `shells/` — Zsh (Prezto, or oh-my-zsh as an alt via `dotfiles.zsh.ohMyZsh.enable`; Powerlevel10k) - `terminals/` — Kitty, Ghostty - `toolchain/` — per-language dev tool configs: c, containers, dotnet, git, go, javascript, kubernetes (with k9s and openshift submodules), nix, ocaml, python -- `users/erik/` — Linux (x86_64) home config; includes `ai.nix` (enables claude-code, github-copilot-cli, cursor-cli) +- `users/erik/` — Linux (x86_64) home config - `users/erasmussen/` — macOS (aarch64-darwin) home config +GNOME desktop config lives in the separate NixOS repo, not here. + Three home configurations are defined: `erik@darter` and `erik@hades` (both x86_64-linux), and `erasmussen@Eriks-MacBook-Pro.local` (aarch64-darwin). Overlays from multiple inputs (devctl, mynix, nil, nix-direnv, nix-vscode-extensions, ux) are composed in `flake.nix` and applied to nixpkgs. `zed.overlays.default` is currently commented out due to a `cargo-about` version conflict. diff --git a/users/erik/ai.nix b/ai/default.nix similarity index 99% rename from users/erik/ai.nix rename to ai/default.nix index 18b496c..50f5012 100644 --- a/users/erik/ai.nix +++ b/ai/default.nix @@ -6,6 +6,7 @@ }: { options.dotfiles.ai.enable = lib.mkEnableOption "Slop"; + config = lib.mkIf config.dotfiles.ai.enable { programs.claude-code.enable = true; home.packages = with pkgs; [ diff --git a/desktops/default.nix b/desktops/default.nix deleted file mode 100644 index 2f93f63..0000000 --- a/desktops/default.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ - imports = [ ./gnome ]; -} diff --git a/desktops/gnome/default.nix b/desktops/gnome/default.nix deleted file mode 100644 index 9194666..0000000 --- a/desktops/gnome/default.nix +++ /dev/null @@ -1,76 +0,0 @@ -{ - pkgs, - lib, - config, - ... -}: -{ - options.dotfiles.gnome.enable = lib.mkEnableOption "Gnome"; - - config = lib.mkIf config.dotfiles.gnome.enable { - home.packages = - (with pkgs; [ - nautilus-python - ]) - ++ (with pkgs.gnomeExtensions; [ - appindicator - dash-to-dock - docker - tweaks-in-system-menu - user-themes - gsconnect - ]); - - dconf = { - enable = true; - settings = { - "org/freedesktop/ibus/panel/emoji" = { - # Disable ctrl+shift+u unicode shortcut, conflicts with JetBrains keybinds - # https://superuser.com/questions/358749/how-to-disable-ctrlshiftu/1392682#1392682 - unicode-hotkey = "@as []"; - }; - - # dconf dump / > tmp.dconf - "org/gnome/shell" = { - disable-user-extensions = false; - enabled-extensions = with pkgs.gnomeExtensions; [ - appindicator.extensionUuid - dash-to-dock.extensionUuid - docker.extensionUuid - gsconnect.extensionUuid - system-monitor.extensionUuid - tweaks-in-system-menu.extensionUuid - user-themes.extensionUuid - ]; - }; - "org/gnome/desktop/interface" = { - accent-color = "pink"; - clock-format = "12h"; - clock-show-seconds = false; - clock-show-weekday = true; - color-scheme = "prefer-dark"; - cursor-theme = "breeze_cursors"; - enable-hot-corners = false; - icon-theme = "Papirus"; - monospace-font-name = "FiraCode Nerd Font Mono 11"; - }; - "org/gnome/shell/extensions/dash-to-dock" = { - autohide = false; - custom-background-color = false; - custom-theme-shrink = true; - dash-max-icon-size = 48; - dock-fixed = true; - dock-position = "RIGHT"; - extend-height = true; - intellihide = false; - running-indicator-dominant-color = false; - running-indicator-style = "DOTS"; - show-show-apps-button = true; # This is not a typo - show-trash = false; - unity-backlit-items = false; - click-action = "cycle-windows"; - }; - }; - }; - }; -} diff --git a/users/erik/gnupg.nix b/gnupg/default.nix similarity index 77% rename from users/erik/gnupg.nix rename to gnupg/default.nix index 730455e..57c5df8 100644 --- a/users/erik/gnupg.nix +++ b/gnupg/default.nix @@ -1,11 +1,11 @@ -{ pkgs, ... }: +{ pkgs, lib, ... }: { programs.gpg.enable = true; services.gpg-agent = { enable = true; enableSshSupport = true; enableZshIntegration = true; - pinentry = { + pinentry = lib.mkIf pkgs.stdenv.isLinux { package = pkgs.pinentry-all; program = "pinentry-gnome3"; }; diff --git a/shells/zsh/default.nix b/shells/zsh/default.nix index 6ffd7a4..a5ff4db 100644 --- a/shells/zsh/default.nix +++ b/shells/zsh/default.nix @@ -5,7 +5,10 @@ ... }: { - imports = [ ./prezto ]; + imports = [ + ./prezto + ./oh-my-zsh + ]; options.dotfiles.zsh.enable = lib.mkEnableOption "zsh"; diff --git a/shells/zsh/oh-my-zsh/default.nix b/shells/zsh/oh-my-zsh/default.nix index fb4734e..aa0364b 100644 --- a/shells/zsh/oh-my-zsh/default.nix +++ b/shells/zsh/oh-my-zsh/default.nix @@ -1,7 +1,9 @@ +{ lib, config, ... }: { - programs.zsh = { - enable = true; - oh-my-zsh = { + options.dotfiles.zsh.ohMyZsh.enable = lib.mkEnableOption "oh-my-zsh (alt to prezto)"; + + config = lib.mkIf config.dotfiles.zsh.ohMyZsh.enable { + programs.zsh.oh-my-zsh = { enable = true; plugins = [ "sudo" diff --git a/toolchain/git/default.nix b/toolchain/git/default.nix index 04f5513..b90bcd0 100644 --- a/toolchain/git/default.nix +++ b/toolchain/git/default.nix @@ -1,59 +1,68 @@ -{ pkgs, ... }: { - programs.git = { - enable = true; - package = pkgs.git; - lfs.enable = true; - - settings = { - core = { - editor = "nvim"; - }; + pkgs, + lib, + config, + ... +}: +{ + options.dotfiles.git.enable = lib.mkEnableOption "git Toolchain"; - user = { - name = "UnstoppableMango"; - email = "erik.rasmussen@unmango.dev"; - }; + config = lib.mkIf config.dotfiles.git.enable { + programs.git = { + enable = true; + package = pkgs.git; + lfs.enable = true; - commit = { - gpgsign = true; - }; + settings = { + core = { + editor = "nvim"; + }; - tag = { - # I think gpgsign=true is what was forcing annotated tags - gpgsign = false; - }; + user = { + name = "UnstoppableMango"; + email = "erik.rasmussen@unmango.dev"; + }; + + commit = { + gpgsign = true; + }; - alias = { - co = "checkout"; - ff = "merge --ff-only"; - last = "log -1 HEAD"; - unstage = "reset HEAD --"; + tag = { + # I think gpgsign=true is what was forcing annotated tags + gpgsign = false; + }; + + alias = { + co = "checkout"; + ff = "merge --ff-only"; + last = "log -1 HEAD"; + unstage = "reset HEAD --"; + }; + + push.autoSetupRemote = true; }; - push.autoSetupRemote = true; + ignores = [ + "**/node_modules/" + ".DS_Store" + ".direnv/" + ".envrc" + ".idea/**/discord.xml" + ".worktree/" + ]; }; - ignores = [ - "**/node_modules/" - ".DS_Store" - ".direnv/" - ".envrc" - ".idea/**/discord.xml" - ".worktree/" - ]; - }; + # Still fiddling with these + # https://github.com/git/git/blob/master/contrib/diff-highlight/README + programs.diff-highlight = { + enable = true; + enableGitIntegration = true; + }; + # https://github.com/so-fancy/diff-so-fancy + # programs.diff-so-fancy.enable = true; + # https://github.com/Wilfred/difftastic + # programs.difftastic.enable = true; - # Still fiddling with these - # https://github.com/git/git/blob/master/contrib/diff-highlight/README - programs.diff-highlight = { - enable = true; - enableGitIntegration = true; + programs.gh.enable = true; }; - # https://github.com/so-fancy/diff-so-fancy - # programs.diff-so-fancy.enable = true; - # https://github.com/Wilfred/difftastic - # programs.difftastic.enable = true; - - programs.gh.enable = true; } diff --git a/toolchain/nix/default.nix b/toolchain/nix/default.nix index 9237698..d941624 100644 --- a/toolchain/nix/default.nix +++ b/toolchain/nix/default.nix @@ -1,9 +1,18 @@ -{ pkgs, ... }: { - home.packages = with pkgs; [ - nil - nixd - nix-init - nurl - ]; + pkgs, + lib, + config, + ... +}: +{ + options.dotfiles.nix.enable = lib.mkEnableOption "nix Toolchain"; + + config = lib.mkIf config.dotfiles.nix.enable { + home.packages = with pkgs; [ + nil + nixd + nix-init + nurl + ]; + }; } diff --git a/users/erasmussen/default.nix b/users/erasmussen/default.nix index 9293182..a108fb3 100644 --- a/users/erasmussen/default.nix +++ b/users/erasmussen/default.nix @@ -4,12 +4,12 @@ let in { imports = [ - ../../shells/zsh + ../../ai ../../editors + ../../gnupg + ../../shells/zsh ../../terminals ../../toolchain - - ./gnupg.nix ]; home = { @@ -24,9 +24,7 @@ in bat buf crane - cursor-cli fnm - github-copilot-cli gitkraken glow pay-respects @@ -37,6 +35,7 @@ in }; dotfiles = { + ai.enable = true; neovim.enable = true; vscode.enable = true; zsh.enable = true; @@ -47,9 +46,11 @@ in containers.enable = true; containers.podmanAutostart = true; dotnet.enable = true; + git.enable = true; go.enable = true; javascript.enable = true; kubernetes.enable = true; + nix.enable = true; openshift.enable = false; ocaml.enable = true; python.enable = true; @@ -84,8 +85,6 @@ in # enableZshIntegration = true; # enableKittyIntegration = config.dotfiles.kitty.enable; # }; - - claude-code.enable = true; }; programs.git = { diff --git a/users/erasmussen/gnupg.nix b/users/erasmussen/gnupg.nix deleted file mode 100644 index b27ebb3..0000000 --- a/users/erasmussen/gnupg.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ - programs.gpg.enable = true; - services.gpg-agent = { - enable = true; - enableSshSupport = true; - enableZshIntegration = true; - }; -} diff --git a/users/erik/default.nix b/users/erik/default.nix index 66ade7f..fcce051 100644 --- a/users/erik/default.nix +++ b/users/erik/default.nix @@ -4,15 +4,13 @@ let in { imports = [ + ../../ai ../../browsers - ../../desktops ../../editors + ../../gnupg ../../shells ../../terminals ../../toolchain - - ./ai.nix - ./gnupg.nix ]; home = { @@ -32,13 +30,16 @@ in }; dotfiles = { + ai.enable = true; emacs.enable = true; neovim.enable = true; zsh.enable = true; c.enable = true; + git.enable = true; go.enable = true; javascript.enable = true; kubernetes.enable = true; + nix.enable = true; python.enable = true; }; From 5736f23e000fd4facc56b0ea4917b7c31791183b Mon Sep 17 00:00:00 2001 From: UnstoppableMango Date: Sat, 11 Jul 2026 23:34:24 -0500 Subject: [PATCH 2/2] Revert the gnome stuff --- AGENTS.md | 3 +- desktops/default.nix | 3 ++ desktops/gnome/default.nix | 76 ++++++++++++++++++++++++++++++++++++++ users/erik/default.nix | 1 + 4 files changed, 81 insertions(+), 2 deletions(-) create mode 100644 desktops/default.nix create mode 100644 desktops/gnome/default.nix diff --git a/AGENTS.md b/AGENTS.md index fcb9d05..0c2ac0d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -32,6 +32,7 @@ The flake uses `flake-parts` with these categorical module directories imported - `ai/` — claude-code, github-copilot-cli, cursor-cli (shared by both users) - `browsers/` — Brave +- `desktops/` — GNOME - `editors/` — VS Code (with profiles per host), Neovim (via nixvim), Zed, Helix, Emacs - `gnupg/` — gpg + gpg-agent (shared by both users; pinentry only on Linux) - `shells/` — Zsh (Prezto, or oh-my-zsh as an alt via `dotfiles.zsh.ohMyZsh.enable`; Powerlevel10k) @@ -40,8 +41,6 @@ The flake uses `flake-parts` with these categorical module directories imported - `users/erik/` — Linux (x86_64) home config - `users/erasmussen/` — macOS (aarch64-darwin) home config -GNOME desktop config lives in the separate NixOS repo, not here. - Three home configurations are defined: `erik@darter` and `erik@hades` (both x86_64-linux), and `erasmussen@Eriks-MacBook-Pro.local` (aarch64-darwin). Overlays from multiple inputs (devctl, mynix, nil, nix-direnv, nix-vscode-extensions, ux) are composed in `flake.nix` and applied to nixpkgs. `zed.overlays.default` is currently commented out due to a `cargo-about` version conflict. diff --git a/desktops/default.nix b/desktops/default.nix new file mode 100644 index 0000000..2f93f63 --- /dev/null +++ b/desktops/default.nix @@ -0,0 +1,3 @@ +{ + imports = [ ./gnome ]; +} diff --git a/desktops/gnome/default.nix b/desktops/gnome/default.nix new file mode 100644 index 0000000..9194666 --- /dev/null +++ b/desktops/gnome/default.nix @@ -0,0 +1,76 @@ +{ + pkgs, + lib, + config, + ... +}: +{ + options.dotfiles.gnome.enable = lib.mkEnableOption "Gnome"; + + config = lib.mkIf config.dotfiles.gnome.enable { + home.packages = + (with pkgs; [ + nautilus-python + ]) + ++ (with pkgs.gnomeExtensions; [ + appindicator + dash-to-dock + docker + tweaks-in-system-menu + user-themes + gsconnect + ]); + + dconf = { + enable = true; + settings = { + "org/freedesktop/ibus/panel/emoji" = { + # Disable ctrl+shift+u unicode shortcut, conflicts with JetBrains keybinds + # https://superuser.com/questions/358749/how-to-disable-ctrlshiftu/1392682#1392682 + unicode-hotkey = "@as []"; + }; + + # dconf dump / > tmp.dconf + "org/gnome/shell" = { + disable-user-extensions = false; + enabled-extensions = with pkgs.gnomeExtensions; [ + appindicator.extensionUuid + dash-to-dock.extensionUuid + docker.extensionUuid + gsconnect.extensionUuid + system-monitor.extensionUuid + tweaks-in-system-menu.extensionUuid + user-themes.extensionUuid + ]; + }; + "org/gnome/desktop/interface" = { + accent-color = "pink"; + clock-format = "12h"; + clock-show-seconds = false; + clock-show-weekday = true; + color-scheme = "prefer-dark"; + cursor-theme = "breeze_cursors"; + enable-hot-corners = false; + icon-theme = "Papirus"; + monospace-font-name = "FiraCode Nerd Font Mono 11"; + }; + "org/gnome/shell/extensions/dash-to-dock" = { + autohide = false; + custom-background-color = false; + custom-theme-shrink = true; + dash-max-icon-size = 48; + dock-fixed = true; + dock-position = "RIGHT"; + extend-height = true; + intellihide = false; + running-indicator-dominant-color = false; + running-indicator-style = "DOTS"; + show-show-apps-button = true; # This is not a typo + show-trash = false; + unity-backlit-items = false; + click-action = "cycle-windows"; + }; + }; + }; + }; +} diff --git a/users/erik/default.nix b/users/erik/default.nix index fcce051..42cb0f8 100644 --- a/users/erik/default.nix +++ b/users/erik/default.nix @@ -6,6 +6,7 @@ in imports = [ ../../ai ../../browsers + ../../desktops ../../editors ../../gnupg ../../shells