The post-install standalone HM activation kept failing in new ways (daemon access, git ownership, missing PATH on first boot). Wire HM as a NixOS module in the generated flake instead, so first-boot dotfiles are activated by `nixos-install` itself with proper system context. The standalone `homeConfigurations.<user>` is kept alongside for fast iteration via `nomarchy-env-update`. Also: - Drop the chroot HM activation block from the installer entirely. - Move `nomarchy-env-update` from `features/scripts/utils/` to `core/system/scripts/` so it ships in `nomarchy-system-scripts` and exists on a freshly-installed system regardless of HM state. - Set system-wide git `safe.directory` for /etc/nixos and the impermanence-relocated /persist/etc/nixos so the user-mode HM run doesn't trip on the root-owned flake repo. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
15 lines
520 B
Nix
15 lines
520 B
Nix
{ pkgs, ... }:
|
|
|
|
{
|
|
environment.systemPackages = [ pkgs.nomarchy-system-scripts ];
|
|
|
|
# /etc/nixos is owned by root, but `nomarchy-env-update` (and `nix
|
|
# flake` invocations) run as the user and shell out to git. Without
|
|
# this, git refuses with "dubious ownership in repository" and HM
|
|
# evaluation fails. Mark both the standard and impermanence-relocated
|
|
# paths as safe at the system level so every user is covered.
|
|
programs.git.config = {
|
|
safe.directory = [ "/etc/nixos" "/persist/etc/nixos" ];
|
|
};
|
|
}
|