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

nix: refactor and start using flake-parts #23

Merged
merged 1 commit into from
Jan 11, 2023
Merged

nix: refactor and start using flake-parts #23

merged 1 commit into from
Jan 11, 2023

Conversation

Kranzes
Copy link
Member

@Kranzes Kranzes commented Jan 10, 2023

No description provided.

{ withSystem, inputs, ... }:

{
flake.checks.x86_64-linux = withSystem "x86_64-linux" ({ pkgs, system, inputs', config, ... }:
Copy link
Member

Choose a reason for hiding this comment

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

Now that we have flake-parts we can also at least add aarch64-linux support for checks as well.

Copy link
Member Author

Choose a reason for hiding this comment

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

Does nixos-remote works on darwin? if not we can just add this to perSystem.

Copy link
Member

@Mic92 Mic92 Jan 10, 2023

Choose a reason for hiding this comment

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

If you have a linux remote builder yes, but not the tests.

Copy link
Member Author

Choose a reason for hiding this comment

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

The reason I am asking is to know whether the $system for packages can match the one for checks.

Copy link
Member Author

@Kranzes Kranzes Jan 10, 2023

Choose a reason for hiding this comment

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

In other words, can you do nix build .#packages.aarch64-darwin.nixos-remote on a mac and actually use it?

Copy link
Member

Choose a reason for hiding this comment

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

You can do nix build .#packages.aarch64-darwin.nixos-remote on a mac and the script should work

Copy link
Member Author

Choose a reason for hiding this comment

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

Looks like nixos-images only builds for x86_64-linux anyway so I guess I will keep it the way it is for now.

Copy link
Member Author

Choose a reason for hiding this comment

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

Also Garnix's aarch64-linux support isn't mediocre at best, it uses emulation. I personally use hercules-ci which lets me use my own runners/agents.

Copy link
Member

Choose a reason for hiding this comment

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

I actually already used it for aarch64 by building the image myself locally (see project readme). However I might also switch to hercules ci that we already deployed in nix-community.

@Kranzes
Copy link
Member Author

Kranzes commented Jan 10, 2023

@Mic92 I pushed with what you suggested, tell me if there is anything else I missed.

Copy link
Member

@phaer phaer left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM! Builds (with flakes on x86_64-linux) and I think flake-parts are an improvement. No strong opinion regarding the aarch64/ci discussion.

@Mic92
Copy link
Member

Mic92 commented Jan 11, 2023

bors merge

@Mic92 Mic92 merged commit 7cb26cb into nix-community:main Jan 11, 2023
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.

3 participants