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:
parent
6cabca3113
commit
45c44f550e
4 changed files with 123 additions and 7 deletions
|
|
@ -13,10 +13,10 @@
|
|||
|
||||
{
|
||||
imports = [
|
||||
# Generated by `nixos-generate-config`. Drop your real
|
||||
# hardware-configuration.nix in alongside this file before the
|
||||
# first build.
|
||||
# ./hardware-configuration.nix
|
||||
# Ships as a placeholder (unbootable values) so `nix flake check`
|
||||
# evaluates cleanly. Overwrite with `nixos-generate-config` output
|
||||
# before the first real `nixos-rebuild switch`.
|
||||
./hardware-configuration.nix
|
||||
|
||||
# Shared helpers (config.lnbits-sensei.lib).
|
||||
./modules/lib.nix
|
||||
|
|
@ -42,6 +42,15 @@
|
|||
networking.hostName = settings.hostName;
|
||||
time.timeZone = settings.timeZone;
|
||||
|
||||
# Primary user. Group declared explicitly per NixOS warning about
|
||||
# implicit `nogroup` defaults. Consumer extends extraGroups as needed.
|
||||
users.users.${settings.user} = {
|
||||
isNormalUser = true;
|
||||
group = settings.user;
|
||||
extraGroups = [ "wheel" ];
|
||||
};
|
||||
users.groups.${settings.user} = { };
|
||||
|
||||
nix.settings.experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
|
|
|
|||
Reference in a new issue