Files
Nomarchy/core/system/nix.nix
Bernardo Magri 2f18d4efcf fix(installer): unblock disko, bootloader, HM activation, hyprland res
- Pass --yes-wipe-all-disks to disko so the silent gum-spin path no
  longer hangs forever waiting on a hidden "yes" confirmation prompt
  (added in disko 1.13's destroy,format,mount mode).
- Stop threading an externally-built pkgs into the user flake's
  nixosSystem; configure nixpkgs through the module system instead so
  core/system/default.nix's nixpkgs.config.allowUnfree stops conflicting
  with the assertion "system configures nixpkgs with an externally
  created instance".
- Enable boot.loader.systemd-boot in the generated system.nix so the
  installed system has an actual bootloader (disko already lays out a
  1 GiB ESP at /boot).
- Bump nix.settings.download-buffer-size to 512 MiB to silence the
  "download buffer is full" warning on large NAR fetches.
- Activate home-manager via `runuser -l` instead of `runuser -u … --
  env HOME=…`. The latter only switches uid and leaves \$USER=root, so
  HM's activation script saw root, warned, and wrote dotfiles into
  /root/ — meaning the user's first login had no Hyprland config.
- Revert default Hyprland monitor line back to highres (live ISO and
  user default) — preferred falls back to EDID's 1024x768 in QEMU and
  on several laptop panels, which is the bug highres was put there to
  defeat.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-02 11:07:02 +01:00

35 lines
1.4 KiB
Nix

{ inputs, lib, ... }:
{
nix = {
settings = {
# Enable experimental features for modern Nix commands and flakes
experimental-features = [ "nix-command" "flakes" ];
# Allow users in the wheel group to manage the Nix store
trusted-users = [ "root" "@wheel" ];
# Optimize storage by hard-linking identical files
auto-optimise-store = lib.mkDefault true;
# Bump the substituter download buffer from the 64 MiB default to
# 512 MiB. Large NARs (kernels, electron apps, the full NixOS
# closure on first install) overrun 64 MiB and Nix prints
# "download buffer is full" until the consumer catches up — the
# warning is harmless but slows substitution and looks like an
# error. 512 MiB comfortably covers everything in our closure.
download-buffer-size = 524288000;
};
# Populates NIX_PATH with the nixpkgs input from the flake.
# This is critical for making 'nix-shell -p ...' and other legacy
# Nix commands work in a flake-based environment without channels.
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
# Map all flake inputs to the system registry.
# This ensures 'nix shell nixpkgs#...' uses the exact same version
# as the rest of the system and doesn't need to re-download.
registry = lib.mapAttrs (_: value: { flake = value; }) inputs;
};
}