Skip to content

add system.primaryUser default.nix#89

Closed
phucisstupid wants to merge 1 commit into
srid:masterfrom
phucisstupid:master
Closed

add system.primaryUser default.nix#89
phucisstupid wants to merge 1 commit into
srid:masterfrom
phucisstupid:master

Conversation

@phucisstupid

Copy link
Copy Markdown

For nix darwin to work

@srid srid left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@phucleeuwu nix-darwin already works for me.

Also note I'm using 24.11:

nix-darwin.url = "github:LnL7/nix-darwin/nix-darwin-24.11";

@srid

srid commented May 23, 2025

Copy link
Copy Markdown
Owner

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

@phucisstupid

Copy link
Copy Markdown
Author

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

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

@srid

srid commented May 27, 2025

Copy link
Copy Markdown
Owner

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?

@phucisstupid

phucisstupid commented May 27, 2025

Copy link
Copy Markdown
Author

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
};

@srid

srid commented May 27, 2025

Copy link
Copy Markdown
Owner

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

@phucisstupid

phucisstupid commented May 28, 2025

Copy link
Copy Markdown
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants