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

gnomeExtensions.systemd-manager: package manually #321469

Merged
merged 3 commits into from
Jun 27, 2024

Conversation

linsui
Copy link
Contributor

@linsui linsui commented Jun 21, 2024

Description of changes

Closes #279638
hardpixel/systemd-manager#19

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.11 Release Notes (or backporting 23.11 and 24.05 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.

@linsui linsui requested a review from jtojnar as a code owner June 21, 2024 09:02
@github-actions github-actions bot added the 6.topic: GNOME GNOME desktop environment and its underlying platform label Jun 21, 2024
@linsui linsui requested a review from doronbehar June 21, 2024 09:03
pkgs/desktops/gnome/extensions/extensions.json Outdated Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

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

Please mention that as per https://extensions.gnome.org/extension/4174/systemd-manager/ is no longer uploaded to e.g.o in the commit message.

Copy link
Member

Choose a reason for hiding this comment

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

I wonder if it is to bypass the review. I have skimmed the source and did not notice anything immediately suspicious.

Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if it is to bypass the review. I have skimmed the source and did not notice anything immediately suspicious.

You mean to say that perhaps the author of the extension is not uploading version to e.g.o to bypass the review of the gnome extensions website?

pkgs/desktops/gnome/extensions/systemd-manager/default.nix Outdated Show resolved Hide resolved
installPhase = ''
mkdir -p $out/share/gnome-shell/extensions/
mv [email protected] $out/share/gnome-shell/extensions/
'';
Copy link
Member

Choose a reason for hiding this comment

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

There are also some Polkit files but we probably do not want to install them to default location since they loosen security. Maybe copy them to share/doc/systemd-manager directory for easier enabling and mention them in longDescription. Though the policy also FHS path so that would need to be patched.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I add the rule to security.polkit.extraConfig directly. Would it be better to source that file from this package directly?

Copy link
Contributor

Choose a reason for hiding this comment

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

I add the rule to security.polkit.extraConfig directly. Would it be better to source that file from this package directly?

I read this in the polkit service:

    # The polkit daemon reads action/rule files
    environment.pathsToLink = [ "/share/polkit-1" ];

I think it means that if the package would provide files in that directory - it should work if it the polkit service is enabled and the package is environment.systemPackage.

Copy link
Contributor

Choose a reason for hiding this comment

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

Pushed a suggestion regarding the polkit policy.

@ofborg ofborg bot requested a review from doronbehar June 21, 2024 11:15
@linsui
Copy link
Contributor Author

linsui commented Jun 27, 2024

Is this ready?

@doronbehar
Copy link
Contributor

Is this ready?

As I said here, I pushed 2 commits that fix the polkit files dilemma. If you think these changes are good @linsui then yes I think we can merge this.

@linsui
Copy link
Contributor Author

linsui commented Jun 27, 2024

Your changes are good to me. :)

@doronbehar doronbehar merged commit 1e3deb3 into NixOS:master Jun 27, 2024
24 checks passed
@linsui linsui deleted the systemd-manager branch June 27, 2024 07:39
@linsui
Copy link
Contributor Author

linsui commented Jun 29, 2024

How can I override this package? I thought this makes manually packaged extensions not overridable.

(extensions: extensions // (callPackages ./manuallyPackaged.nix {}))

Changing this to

    (extensions: extensions // (import ./manuallyPackaged.nix { inherit callPackage; }))

works.

@doronbehar
Copy link
Contributor

You are right... Also .overrideScope is not available. What do you think about @linsui's suggestion @jtojnar ?

@jtojnar
Copy link
Member

jtojnar commented Jun 30, 2024

I think @linsui's suggestion makes sense.

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.

gnomeExtensions.systemd-manager outdated and crashes in Gnome 45.2 Wayland
3 participants