I had asked Claude to answer this the other two questions and only just now checked. This is what it said (I never told it I asked questions here but it found them:
The NixOS Discourse posts from three hours ago (cited in results) are almost certainly from this session. The community has not yet answered them. The research provides enough information to address all three questions directly.
Question 3 — The Correct Pattern for Stable vs Unstable Packages
There is a clear, established decision tree. The concern about overrides being bad practice applies only to a specific misuse, not to the feature itself.
Layer 1 — System packages in configuration.nix:
pkgs resolves from whatever nixpkgs the system flake declares. If the system is on 26.05 stable, pkgs.hyprland is the 26.05 version. No additional pattern is needed for packages present in stable.
For packages only in unstable, use _module.args:
{ _module.args.pkgsUnstable = import inputs.nixpkgs-unstable {
inherit (pkgs.stdenv.hostPlatform) system;
inherit (config.nixpkgs) config;
};
}
Then reference pkgsUnstable.somePackage in environment.systemPackages.
Layer 2 — User packages in home.nix:
pkgs resolves from whatever nixpkgs the Home Manager flake declares. Since home-manager init defaults to nixos-unstable, pkgs.somePackage in home.nix is already the unstable version. No additional pattern is needed.
For packages only in stable from Home Manager, the equivalent pattern applies using a pkgsStable argument.
Layer 3 — Packages from their own dedicated flakes:
Packages like Noctalia that are not sourced from nixpkgs channels at all are added as direct flake inputs and referenced via inputs.flake.packages.${system}.default. No channel is involved.
On overrides:
override and overrideAttrs are legitimate Nix primitives used extensively within nixpkgs itself and are not bad practice. What is considered bad practice is importing nixpkgs imperatively inside derivations using import <nixpkgs> {} or builtins.fetchTarball with channel URLs, because these bypass the flake’s reproducibility guarantees. Overlays — which use the same mechanisms — are the established pattern for system-wide package customization and are fully compatible with flakes.
The correct pattern for this specific setup:
| Package source |
Location |
Pattern |
| In nixpkgs 26.05 stable |
configuration.nix |
pkgs.package |
| In nixpkgs unstable only |
configuration.nix |
pkgsUnstable.package via _module.args |
| In nixpkgs unstable (HM default) |
home.nix |
pkgs.package |
| In a dedicated flake (Noctalia) |
Both |
inputs.flake.packages.${system}.default or flake modules |
| Hyprland |
configuration.nix |
programs.hyprland.enable = true (stable 26.05) |
| Hyprland user config |
home.nix |
wayland.windowManager.hyprland (HM module) |