chore: get nix flake check evaluation green

Three blockers off the path so the skeleton evaluates cleanly:

1. flake.lock generated (no inputs were pinned before).
2. hardware-configuration.nix shipped as a placeholder — unbootable
   /dev/null root + grub on nodev — so `system.build.toplevel` resolves
   without complaining about missing fileSystems / boot.loader. The
   file carries a big "overwrite with nixos-generate-config" warning;
   the consumer regenerates it before any real switch.
3. Primary user + group declared in configuration.nix (was tripping
   the assertion about implicit nogroup defaults and isNormalUser
   missing).

Also: `home.homeDirectory` now uses `lib.mkForce` to override
home-manager's nixos-module default of /var/empty, and the deprecated
`programs.git.user{Name,Email}` options migrated to the new
`programs.git.settings.user.{name,email}` shape.

`nix flake check --no-build` now finishes with `all checks passed!`
and no warnings, giving every subsequent change a cheap signal.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Padreug 2026-05-25 15:12:11 +02:00
commit 45c44f550e
4 changed files with 123 additions and 7 deletions

View file

@ -0,0 +1,38 @@
# PLACEHOLDER — do not boot from this.
#
# This file ships with the scaffold purely so `nix flake check` and
# `nixos-rebuild build` evaluate without screaming about missing
# `fileSystems."/"` and `boot.loader.*`. The values are syntactically
# valid but intentionally unusable — `/dev/null` is not a real root.
#
# Before the first real `nixos-rebuild switch`, overwrite this file:
#
# sudo nixos-generate-config --root / --dir /etc/nixos
#
# or, if your repo lives elsewhere, copy the generated file in by hand.
# The autogenerated version pins your actual disks, kernel modules,
# and bootloader to the running machine.
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
fileSystems."/" = {
device = "/dev/null";
fsType = "ext4";
};
boot.loader.grub = {
enable = true;
devices = [ "nodev" ];
};
# Required for evaluation. The consumer's real configuration will
# almost always overwrite this with `nixos-generate-config` output.
boot.initrd.availableKernelModules = [ ];
boot.kernelModules = [ ];
}