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

nixos/system-config-printer: init #67585

Merged
merged 8 commits into from Sep 6, 2019

Conversation

worldofpeace
Copy link
Contributor

@worldofpeace worldofpeace commented Aug 27, 2019

Motivation for this change

I noticed that system-config-printer had a systemd service and udev rules that probably need to be added for appropriate function. I haven't switched gnome3 to use it yet because it would cause conflicts with other work.(merged)

Currently haven't tested this with a printer.
I've tested printing in GNOME 3 and Pantheon.

Release note

Screenshot from 2019-08-27 16 12 44

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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 nix-review --run "nix-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.
Notify maintainers

cc @matthewbauer (cups maintainer)

@worldofpeace
Copy link
Contributor Author

worldofpeace commented Aug 27, 2019

@matthewbauer What do you think about adding this polkit rule for cups?

polkit.addRule(function(action, subject) { 
    if (action.id == "org.opensuse.cupspkhelper.mechanism.all-edit" && 
        subject.isInGroup("wheel")){ 
        return polkit.Result.YES; 
    } 
});

Currently wheel users have to authenticate to add a printer (not to mention an old issue everyone dislikes). Not sure what others distros have done.

@worldofpeace
Copy link
Contributor Author

cc @jtojnar.

I'm realizing that this can either be used as a service or directly as the program (introducing the system-config-printer executable and xdg-autostart in the environment)

Should I map the options like

  • programs.system-config-printer.enable
  • services.system-config-printer.enable

Where programs enables the service and introduces it into environment.systemPackages?
Or perhaps it's as a service but with an enableGui option.

@worldofpeace worldofpeace force-pushed the system-config-printer branch 3 times, most recently from 7bde0d5 to ecf4d3d Compare September 6, 2019 13:57
@worldofpeace
Copy link
Contributor Author

Checked that there is actually a print settings section in mate when printing is enabled.

@worldofpeace worldofpeace merged commit 5d4890b into NixOS:master Sep 6, 2019
@worldofpeace worldofpeace deleted the system-config-printer branch September 6, 2019 16:08
dtzWill pushed a commit to dtzWill/nixpkgs that referenced this pull request Nov 20, 2019
nixos/system-config-printer: init

(cherry picked from commit 5d4890b)
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.

None yet

1 participant