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

flake.nix: Make all nixosSystems overridable #101475

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

@jD91mZM2
Copy link
Member

@jD91mZM2 jD91mZM2 commented Oct 23, 2020

Motivation for this change

See nix-community/nixos-generators#76. I don't
mean to say you should do it just because of this one project, but this
is an example of how it might be used - I'm sure there are other reasons
to override a nixosSystem

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
See nix-community/nixos-generators#76. I don't
mean to say you should do it just because of this one project, but this
is an example of how it might be used - I'm sure there are other reasons
to override a nixosSystem
@@ -25,7 +25,7 @@
in
{
lib = lib.extend (final: prev: {
nixosSystem = { modules, ... } @ args:
nixosSystem = final.makeOverridable ({ modules, ... } @ args:
Copy link
Member

@andir andir Oct 27, 2020

Do we really need more and more complexity in the flake.nix? Shouldn't we have everything you need in nixpkgs already? I guess your change is reasonable but it just made me look at this file for the first time.

The whole complexity below is probably already present elsewhere in the repo. Is there a reason for not using that?

Copy link
Member Author

@jD91mZM2 jD91mZM2 Oct 28, 2020

I don't feel comfortable arguing for why flake.nix looks like it does, but my guess it'll be put elsewhere when flakes are the standard

@stale
Copy link

@stale stale bot commented Jun 4, 2021

I marked this as stale due to inactivity. → More info

@legendofmiracles
Copy link
Contributor

@legendofmiracles legendofmiracles commented Sep 16, 2021

Still important to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants