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

Polkit authentication agent(s) #3739

Open
cyntheticfox opened this issue Mar 4, 2023 · 8 comments · May be fixed by #6631
Open

Polkit authentication agent(s) #3739

cyntheticfox opened this issue Mar 4, 2023 · 8 comments · May be fixed by #6631
Assignees

Comments

@cyntheticfox
Copy link
Member

Description

I'm running into needing/wanting a graphical Polkit agent, but there's no current agents present in home-manager.

I've seen #2400 and am considering writing something based on that, though with the GNOME polkit as I'm running Sway, and other recommendations I've been given involved xdg-autostart (which is external state).

Could we re-open the mentioned PR, or should I draft a new one?

I'm currently just running

systemd.user.services.sway-polkit-authentication-agent = {
  Unit = {
    Description = "Sway Polkit authentication agent";
    Documentation = "https://gitlab.freedesktop.org/polkit/polkit/";
    After = [ "graphical-session-pre.target" ];
    PartOf = [ "graphical-session.target" ];
  };

  Service = {
    ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
    Restart = "always";
    BusName = "org.freedesktop.PolicyKit1.Authority";
  };

  Install.WantedBy = [ "graphical-session.target" ];
};

Not sure if that BusName arg is needed...

@stale
Copy link

stale bot commented Jun 9, 2023

Thank you for your contribution! I marked this issue as stale due to inactivity. Please be considerate of people watching this issue and receiving notifications before commenting 'I have this issue too'. We welcome additional information that will help resolve this issue. Please read the relevant sections below before commenting.

If you are the original author of the issue

  • If this is resolved, please consider closing it so that the maintainers know not to focus on this.
  • If this might still be an issue, but you are not interested in promoting its resolution, please consider closing it while encouraging others to take over and reopen an issue if they care enough.
  • If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

If you are not the original author of the issue

  • If you are also experiencing this issue, please add details of your situation to help with the debugging process.
  • If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

Memorandum on closing issues

Don't be afraid to manually close an issue, even if it holds valuable information. Closed issues stay in the system for people to search, read, cross-reference, or even reopen – nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort.

@stale stale bot added the status: stale label Jun 9, 2023
@zombiehoffa
Copy link

did this go anywhere? I see it still open.

@stale stale bot removed the status: stale label Mar 7, 2024
@mobsenpai
Copy link

mobsenpai commented Jun 3, 2024

@rycee This should be added.

I am using this currently ->

{
  config,
  lib,
  pkgs,
  ...
}: {
  options = {
    myNixos.polkit-gnome.enable = lib.mkEnableOption "Enables polkit-gnome";
  };

  config = lib.mkIf config.myNixos.polkit-gnome.enable {
    security.polkit.enable = true;

    systemd.user.services.polkit-gnome-authentication-agent-1 = {
      description = "polkit-gnome-authentication-agent-1";
      wantedBy = ["graphical-session.target"];
      wants = ["graphical-session.target"];
      after = ["graphical-session.target"];
      serviceConfig = {
        Type = "simple";
        ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
        Restart = "on-failure";
        RestartSec = 1;
        TimeoutStopSec = 10;
      };
    };
  };
}

@mobsenpai
Copy link

did this go anywhere? I see it still open.

no sadly.

@sumnerevans
Copy link
Member

@mobsenpai feel free to submit a PR with your changes.

@mobsenpai
Copy link

mobsenpai commented Jul 7, 2024

@sumnerevans I waited for someone experienced to do it first, because I haven't opened any PR but here you go! I know it's not at all a good PR, but I did what I could.

#5619

Copy link

stale bot commented Jan 3, 2025

Thank you for your contribution! I marked this issue as stale due to inactivity. Please be considerate of people watching this issue and receiving notifications before commenting 'I have this issue too'. We welcome additional information that will help resolve this issue. Please read the relevant sections below before commenting.

If you are the original author of the issue

  • If this is resolved, please consider closing it so that the maintainers know not to focus on this.
  • If this might still be an issue, but you are not interested in promoting its resolution, please consider closing it while encouraging others to take over and reopen an issue if they care enough.
  • If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

If you are not the original author of the issue

  • If you are also experiencing this issue, please add details of your situation to help with the debugging process.
  • If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

Memorandum on closing issues

Don't be afraid to manually close an issue, even if it holds valuable information. Closed issues stay in the system for people to search, read, cross-reference, or even reopen – nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort.

@stale stale bot added the status: stale label Jan 3, 2025
@terlar
Copy link
Contributor

terlar commented Jan 3, 2025

Recent work happened in #5619 so not stale.

@stale stale bot removed the status: stale label Jan 3, 2025
@bobvanderlinden bobvanderlinden linked a pull request Mar 14, 2025 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants