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

httpd: added serviceExpression which extends the serviceType concept … #22269

Merged
merged 1 commit into from Feb 6, 2017
Merged

httpd: added serviceExpression which extends the serviceType concept … #22269

merged 1 commit into from Feb 6, 2017

Conversation

qknight
Copy link
Member

@qknight qknight commented Jan 29, 2017

Motivation for this change

with this change one can supply a httpd module as mediawiki.nix from outside of nixpkgs which makes extending httpd much easier during development and deployment:

example usage

  services.httpd = {
        enable = true;
        adminAddr = "admin@example.org";

        hostName = "example.org";
        extraSubservices =
        [ 
          { 
            serviceExpression=./httpd-module-nextcloud.nix;
            urlPrefix = "/nextcloud";
            dbPassword = "hallo";
            adminPassword = "mysuperpassword";
            trustedDomain="example.org";
          }
        ];
      };
  ...

note: this change only extends httpd abstraction and also changes the precedence: svc.function > serviceExpression > serviceType

this patch is a huge relief as it makes httpd extensions trivial and one does not have to manage a nixpkgs checkout for simple httpd module tests/extensions.

Things done

  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • OS X
    • Linux
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

…-> allows that httpd services can live outside of nixpkgs
@mention-bot
Copy link

@qknight, thanks for your PR! By analyzing the history of the files in this pull request, we identified @edolstra, @aszlig and @peti to be potential reviewers.

@qknight qknight requested a review from aszlig January 31, 2017 19:08
@qknight qknight merged commit d491728 into NixOS:master Feb 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants