Skip to content

Conversation

phucisstupid
Copy link

For nix darwin to work

Copy link
Owner

@srid srid left a comment

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
Copy link
Owner

srid commented May 23, 2025

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

@phucisstupid
Copy link
Author

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

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

@srid
Copy link
Owner

srid commented May 27, 2025

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
Copy link
Author

phucisstupid commented May 27, 2025

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
Copy link
Owner

srid commented May 27, 2025

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
Copy link
Author

phucisstupid commented May 28, 2025

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