refactor: make hosts declarative and consolidate shared config

- add my.username / my.gaming.enable / my.ai.local.enable options and
  gate optional app modules on them instead of per-host import lists
- move vendor-neutral hardware.graphics into modules/graphical, leaving
  only NVIDIA-specific drivers and env vars in modules/hardware/nvidia
- derive the primary user everywhere from my.username (users, getty,
  home-manager, tmpfiles)
- de-duplicate Hyprland autostart down to a single system loginShellInit
  using the start-hyprland wrapper
- consolidate all nixpkgs overlays into modules/core/nix.nix and use
  final.stdenv.hostPlatform.system
- make the zsh rebuild helper target $(hostname) instead of hardcoded hades
- add nixpkgs follows for nixos-hardware, pi and comfy-ui (single nixpkgs)
- add .gitignore and a nixfmt flake formatter; format all nix files
- remove empty browser.nix/display-configuration.nix and rename
  local_ai.nix -> local-ai.nix
- document the my.* toggles in the README
This commit is contained in:
2026-09-18 23:32:32 -07:00
parent 367e21ef95
commit 598a43eace
30 changed files with 1093 additions and 768 deletions

View File

@@ -4,7 +4,10 @@
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-26.05";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
nixos-hardware = {
url = "github:NixOS/nixos-hardware/master";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager/release-26.05";
@@ -23,9 +26,9 @@
comfy-ui = {
url = "github:utensils/comfyui-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
herdr = {
url = "github:herdrdev/herdr";
inputs.nixpkgs.follows = "nixpkgs";
@@ -33,6 +36,7 @@
pi = {
url = "github:lukasl-dev/pi.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
@@ -46,26 +50,18 @@
./modules/graphical
./modules/apps
inputs.home-manager.nixosModules.home-manager
{
nixpkgs.overlays = [
(final: prev: {
unstable = import inputs.nixpkgs-unstable {
inherit (final) system;
config.allowUnfree = true;
};
})
inputs.antigravity.overlays.default
inputs.comfy-ui.overlays.default
];
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = { inherit inputs; };
backupFileExtension = "backup";
users.anish = import ./home;
};
}
(
{ config, ... }:
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = { inherit inputs; };
backupFileExtension = "backup";
users.${config.my.username} = import ./home;
};
}
)
];
in
{
@@ -80,6 +76,8 @@
};
};
formatter.${system} = inputs.nixpkgs.legacyPackages.${system}.nixfmt;
devShells.${system}.default =
let
pkgs = import inputs.nixpkgs {