-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add overlay output, allow overriding NixOS module package, respect Nixpkgs config #26
Conversation
Allows re-packaging in your own flake using your Nixpkgs pin's configuration, notably `allowUnfree = true`. Using the `packages.x86_64-linux.kolide-launcher` derivation directly doesn't respect your Nixpkgs config because it relies on vanilla Nixpkgs from the flake input.
Before this change, my coworkers had to run their After this change, their Nixpkgs configs (with |
@evanrelf thank you for contributing this! Took a quick look through and it looks good to me -- I will approve/merge on Tuesday. |
It looks like this fails |
Hmm, I don't understand why it's failing with that error... seems to contradict my code, since I am using the name I don't have access to an |
Overlays are system-agnostic. The error in CI is bad. Running `nix flake check` locally (works far enough on macOS to check this) with Nix 2.20.5, I get this more helpful error: ``` error: … while checking flake output 'overlays' at /nix/store/43a7kmhwjk6hvzvfnbybrwbdkxxggp8s-source/flake.nix:16:5: 15| 16| overlays.x86_64-linux.default = final: prev: { | ^ 17| kolide-launcher = final.callPackage ./kolide-launcher.nix { }; … while checking the overlay 'overlays.x86_64-linux' at /nix/store/43a7kmhwjk6hvzvfnbybrwbdkxxggp8s-source/flake.nix:16:5: 15| 16| overlays.x86_64-linux.default = final: prev: { | ^ 17| kolide-launcher = final.callPackage ./kolide-launcher.nix { }; error: overlay is not a function, but a set instead ```
Actually I think I might've found the issue. |
Oof silly typo. Sorry for the churn. If this doesn't work, I'll wait to come back with a fix I know works 😅 |
I think I fixed the setting where it's requiring a manual approval from me to run the checks in CI, hopefully that makes it a little easier 🤞 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I re-tested on an x86 linux VM and it still works -- I think the final CI failure yesterday was just CI flakiness. I re-ran and it passed. Thanks again for this contribution!
This adds an overlay output to the flake, and allows overriding the package used by the NixOS module. The motivation for this was (quoting the first commit):
Commits are atomic; I recommend reviewing them individually.
Thanks for supporting Nix/NixOS!