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

networkmanager: make packages configurable #300751

Closed
wants to merge 1 commit into from

Conversation

anna328p
Copy link
Member

@anna328p anna328p commented Apr 1, 2024

Description of changes

Added configuration options for packages used by the NetworkManager module. Also some general code cleanup.

Allows overriding the version of e.g. ModemManager used by the system without rebuilding everything that depends on it.

I used this to try the experimental XMM7360 fork of ModemManager.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@Aleksanaa
Copy link
Member

What's the problem with with pkgs here? The top-level with lib is to blame.

@anna328p
Copy link
Member Author

anna328p commented Apr 2, 2024

Ideally I'd get rid of both, I didn't have enough time yesterday. The main issue is honestly that it makes nil struggle

@anna328p
Copy link
Member Author

Finished the code cleanup. Let's see if the tests pass...

Copy link
Member

Choose a reason for hiding this comment

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

Could you please split the cleanups, formatting and the actual change into separate commits, this is hard to review.

Copy link
Member Author

Choose a reason for hiding this comment

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

I can try, I've never done that before.

listToAttrs
;

inherit (lib)
Copy link
Member

Choose a reason for hiding this comment

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

Most of these occur just a few times, it would be cleaner to just use lib. prefix inline. Same for the builtins.

Copy link
Member Author

Choose a reason for hiding this comment

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

Just for the ones that don't get used often, or for every invocation of a function in lib? If it's the former, then what's the threshold?

connectionPath = id:
"/run/NetworkManager/system-connections/${id}.nmconnection";

inputPath = ini.generate (escapeShellArg profile.n) profile.v;
Copy link
Member

Choose a reason for hiding this comment

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

Error here, should be lib.ini.

Copy link
Member Author

Choose a reason for hiding this comment

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

caught it, just haven't been back at my computer for a bit

@Janik-Haag Janik-Haag removed their request for review July 7, 2024 13:11
@Enzime
Copy link
Member

Enzime commented Aug 27, 2024

There's another PR that also implements similar changes #316824

@anna328p
Copy link
Member Author

That PR looks like what I would like to see from this one. As I don't have the time to go through this PR at the moment, I'll probably close it.

@anna328p anna328p closed this Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants