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/printing: fix extraConf configuration option #93171

Closed
wants to merge 1 commit into from

Conversation

elohmeier
Copy link
Contributor

Motivation for this change

The config option services.printing.extraConf was set in the printing module implementation, making it hard for users to configure additional cupsd.conf settings.

Things done

Fixed cupsd.conf generation (now similar to cups-files.conf generation).

  • 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.

@matthewbauer @Ma27

@elohmeier
Copy link
Contributor Author

I think this fix should also be backported to 20.03.

@Ma27
Copy link
Member

Ma27 commented Jul 15, 2020

Why is this hard? This option is of type types.lines, so you can simply append additional config like this:

{
  services.printing.extraConf = ''
    # additional cfg
  '';
}

@rnhmjoj
Copy link
Contributor

rnhmjoj commented Jul 27, 2020

I'm not sure why this change would improve the ease of configurability.
In facts, I think it makes it harder (or impossible) to change these values: previously you could do a lib.mkForce to override the defaults but know they are placed before extraConf. So, unless cups gives priority the last value in order of appearance, you can't change them anymore.

@elohmeier
Copy link
Contributor Author

Thanks for your help, didn't notice it was types.lines 🙈

@elohmeier elohmeier closed this Jul 27, 2020
@elohmeier elohmeier deleted the fix-cups-extraconf branch July 27, 2020 17:31
@rnhmjoj
Copy link
Contributor

rnhmjoj commented Jul 27, 2020

No problem ;)

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

3 participants