nixos-config icon indicating copy to clipboard operation
nixos-config copied to clipboard

add system.primaryUser default.nix

Open phucisstupid opened this issue 11 months ago • 6 comments

For nix darwin to work

phucisstupid avatar May 18 '25 04:05 phucisstupid

Updated to stable (https://github.com/srid/nixos-config/commit/446fcadb1bbfff1a70f023c70541f646359ea61a); still can't reproduce this.

srid avatar May 23 '25 04:05 srid

Updated to stable (446fcad); still can't reproduce this.

I use nh darwin switch: https://github.com/nix-community/nh

phucisstupid avatar May 23 '25 05:05 phucisstupid

Updated to stable (446fcad); still can't reproduce this.

I use nh darwin switch: https://github.com/nix-community/nh

How are you using it?

I get:

❯ nix run github:nix-community/nh darwin switch .#infinitude
> Building Darwin configuration
error: flake 'git+file:///Users/srid/code/nixos-config' does not provide attribute 'packages.aarch64-darwin.infinitude.config.system.build.toplevel', 'legacyPackages.aarch64-darwin.infinitude.config.system.build.toplevel' or 'infinitude.config.system.build.toplevel'
┏━ 1 Errors:
┃ error: flake 'git+file:///Users/srid/code/nixos-config' does not provide attribute 'packages.aarch64-darwin.infinitude.config.system.build.toplevel', 'legacyPackages.…
┣━━━
┗━ ∑ ⚠ Exited with 1 errors reported by nix at 18:16:51 after 0s
Error:
   0: Command exited with status Exited(1)

Location:
   src/commands.rs:262

It doesn't respect darwinConfigurations?

srid avatar May 27 '25 08:05 srid

nix run github:nix-community/nh darwin switch .#infinitude

-H stand for host, you should use:

nh darwin switch -H infinitude .

nh can be install though home manager:

    programs.nh = {
      enable = true;
      flake = builtins.toString ../../..;  #path to flake.nix dir
};

phucisstupid avatar May 27 '25 12:05 phucisstupid

Cool.

Yes activation worked on master with nh as well.

nh can be install though home manager:

Incidentally, I'm wondering if I should make https://github.com/srid/nixos-unified to make nh.

cf. https://github.com/srid/nixos-unified/blob/a1d1cd9ae1ca9866f47afc5e12f30acded261fcb/activate/activate.nu#L54-L100

srid avatar May 27 '25 21:05 srid

Incidentally, I'm wondering if I should make srid/nixos-unified to make nh.

Absolutely — nh is a better choice for most flake-based Nix setups.

phucisstupid avatar May 28 '25 00:05 phucisstupid