Repository navigation
refactor: untangle modules, home layout and lib plumbing - #104
Merged
Merged
Conversation
Each NixOS module (modules/**.nix) and Home Manager module (home/**/default.nix) now declares its own `enable` option at the path matching its file and gates only on it. modules/default.nix and home/default.nix import every module automatically (lib/modules-in.nix), so adding a module touches one file. - Remove the category-level `enable` switches and the default.nix files that listed options and imports; profiles list the leaves they want. - Remove the Home Manager root-level pseudo options (brave.enable, fonts.enable, git.*) and the forwarding aggregators; group defaults live in profiles/home/common.nix. - lib/hosts.nix normalizes hosts/*/meta.nix once; lib/default.nix returns the finished nixosConfigurations/homeConfigurations. Drop the unused overlays, modules, roles and path parameters. - Move home/users to users/ and home/hosts/<h>.nix to hosts/<h>/home.nix so home/ only holds modules. - Share scheme/cursor/polarity/terminal size through theme.nix and the default browser through myConfig.system.environment.defaultBrowser. - sops sets the default hashedPasswordFile; the users module loses its unused options and gaming groups move to the steam module. - Gate the Hyprland sub-files behind hyprland.enable, move the DP-1 screenshot bind to the desktop host and fix the swapped down/right focus binds. - Remove restating comments, commented-out code, no-op defaults and the unreferenced swww scripts. Behavior changes: the empty `xboxusers` group is gone, `example` no longer gets the Hyprland screenshot scripts, and selene no longer has the DP-1 bind. Installed packages are otherwise unchanged for desktop, selene and example.
…hem as an overlay
…n from desktop disko
Upstream core.nix does not declare sqlite, so linking fails with -lsqlite3. Override serpantinum-core with sqlite and pkg-config (ported from 15871ea on main).
Both Stylix modules read MonoLisa from theme.nix (the NixOS one used TX-02); ghostty, serpantinum and noctalia read it from Stylix instead of hardcoding their own font.
Enable the Stylix starship target and drop the unused mocha palette; hyprland borders and the wofi stylesheet use the Stylix palette and mono font. Remove the unused duplicate wofi catppuccin-macchiato.css.
Wayland layouts (hyprland, sway) live in hosts/desktop/home.nix; the i3 backup uses a single xrandr line with the integrated-GPU output names. Drop the conflicting DP-0 autorandr profile (180 Hz vs 165 Hz), the laptop/desktop outputs hardcoded in the shared sway module and noctalia's stale DP-3 wallpaper entry.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Every NixOS module (
modules/**.nix) and Home Manager module (home/**/default.nix) now declares its ownenableoption at the path matching its file and gates only on it.modules/default.nixandhome/default.niximport every module automatically (lib/modules-in.nix), so a new module is one file.enableswitches, the per-directorydefault.nixoption/import lists, and the Home Manager root-level pseudo options (brave.enable,fonts.enable,git.*, ...). Group defaults moved toprofiles/home/common.nix.lib/hosts.nixnormalizeshosts/*/meta.nixonce;lib/default.nixreturns the finishednixosConfigurations/homeConfigurations. Unusedoverlays,modules,rolesand path parameters are gone.home/users/->users/,home/hosts/<h>.nix->hosts/<h>/home.nix, sohome/only holds modules.theme.nixis the single source for scheme/cursor/polarity/terminal size and the monospace font; the default browser is one option (myConfig.system.environment.defaultBrowser).Follow-up commits
docs(readme): new "Extending the config" section (add a module, package, host or user) and a list of the dependencies between the NixOS and Home Manager layers.fix(selene):hardware-configuration.nixregenerated on the real laptop (it came from a VM: virtio,kvm-intel, nonvme). Now includesnvme,kvm-amd,not-detected.nixand AMD microcode updates.refactor(pkgs): packages moved topkgs/<name>/package.nix, exposed asoverlays.default(applied bymkHostandmkHome) and as thepackagesoutput. Modules now usepkgs.inkdropandpkgs.artix-experimental-launcher. Also fixesreal-vnc-viewer, which never evaluated.chore: remove the finisheddocs/architecture-plan.mdand the redundant EF02 partition from the desktop'sdisko.nix(EFI-only GRUB; existing installs are unaffected becauseenableConfig = false).refactor(home): remove the cymbal Home Manager module (the package stays inpkgs/).fix(serpantinum): link sqlite intoserpantinum-core; the same fix as15871eaonmain, which this branch did not have yet. Mergingmainis clean.chore(redyf): disable minecraft.modrinth-appdepends onturbo, andturbo-unwrapped2.11.7 in the current nixpkgs fails to build (zstd-sysneedspkg-config/zstd, which the package does not declare).refactor(theme): one monospace font (MonoLisa) intheme.nix, read by both Stylix modules; ghostty, serpantinum, noctalia and wofi take it from Stylix instead of hardcoding their own.refactor(theme): starship (Stylix target enabled, unused mocha palette dropped), hyprland borders and the wofi stylesheet use the Stylix palette. The unused duplicatewofi/themes/catppuccin-macchiato.cssis removed. tmux already used the Stylix palette.fix(desktop): the desktop monitors are described once per display protocol. Wayland (hyprland, sway) is inhosts/desktop/home.nix; the i3 backup uses a singlexrandrline inconfiguration.nix. Removed the conflictingDP-0autorandr profile (180 Hz vs 165 Hz indisplaySetup), the outputs hardcoded in the shared sway module and noctalia's staleDP-3wallpaper entry.Behavior changes
xboxusersgroup no longer exists.exampleno longer gets the Hyprlandscreenshotscripts (Hyprland sub-files are now gated).CTRL+Print/grim -o DP-1bind moved to the desktop host, so selene no longer has it.down/rightfocus binds in Hyprland.crust/mantleshades, which the base16 scheme does not have: the window background isbase00and the search fieldbase01. The selection gradient has 14 palette stops instead of 20 hand-mixedrgbavalues.myConfig.services.autorandrnow). The i3xrandrline uses the integrated-GPU names (DP-1,HDMI-2) and now also sets up the rotated secondary monitor.CTRL+Print/grim -o DP-1moved to the desktop host; selene relies on sway auto-detectingeDP-1.Verification
nix flake checkpasses.desktop,selene,exampleand the three Home Manager configs, also with every option switched on. Installed package sets are identical apart from theexamplescreenshot scripts; remaining diffs are the items above, the nix registry (dirty-tree noise) and package ordering.nh os teston selene built and activated the first commit of this branch. The hardware config andpkgs/commits were checked withnix flake checkand derivation comparison, not yet activated.nh os switchandnh home switchon desktop built and activated everything up tochore(redyf): disable minecraft. The theme and monitor commits were checked withnix flake checkand by evaluating the resulting fonts, colours andxrandrline, not yet activated.Not done
HDMI-2is inferred from the kernel connectorHDMI-A-2and is untested in i3.DP-3/HDMI-A-3@144) is in5fe5f91.fontDefault(UI font) is still JetBrainsMono Nerd Font.