Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create / publish a flake with a nix-darwin module #6

Merged
merged 3 commits into from
Mar 18, 2024

Conversation

grahamc
Copy link
Contributor

@grahamc grahamc commented Mar 16, 2024

Usage looks like this:

{
  imports = [
    h.darwinModules.default
  ];
  programs.h.codeRoot = "~/projects";
}

flake.nix Outdated Show resolved Hide resolved
description = "faster shell navigation of projects";

inputs = {
nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.0";
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.0";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";

What does the 0.1.0 stand for in the context of nixpkgs? Shouldn't it be 23.11 or something similar?

I prefer to keep the canonical source of nixpkgs from the channels.

Copy link
Contributor Author

@grahamc grahamc Mar 17, 2024

Choose a reason for hiding this comment

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

0.1.0 resolves to the current nixos-unstable.

If you'd like to track the latest stable, we could do this which always pulls the most current stable:

Suggested change
nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.0";
nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/*";

which currently resolves to 0.2311.556770+rev-8ac30a39abc5ea67037dfbf090d6e89f187c6e50.

I of course don't mind using the upstream channel, but then to keep it from going really out of date without active maintenance, maybe using nixpkgs-unstable? What do you think?

Copy link
Owner

Choose a reason for hiding this comment

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

I think I'll humour you with the flakehub changes for now. Let's see how it goes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let me know what you think! :)

Copy link
Owner

Choose a reason for hiding this comment

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

Small thing: I wish the flakehub-push action would output a summary with a link to the release. Something like: "Done! rev XYX is now set as the release ABC at https://flakehub.com/f/zimbatm/h". As a new user who received a PR for my repo, it's not obvious where to go otherwise.

@grahamc grahamc requested a review from zimbatm March 17, 2024 12:33
@zimbatm zimbatm merged commit aeec72b into zimbatm:master Mar 18, 2024
@grahamc grahamc deleted the flake branch March 18, 2024 13:19
@grahamc grahamc restored the flake branch March 18, 2024 13:19
@grahamc grahamc deleted the flake branch March 18, 2024 13:19
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.

None yet

2 participants