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/tomcat: regression in master: type specification for services.tomcat.virtualHosts is wrong #44361

Closed
pvgoran opened this issue Aug 2, 2018 · 2 comments

Comments

@pvgoran
Copy link
Contributor

pvgoran commented Aug 2, 2018

Issue description

Commit 472f16d introduced type specification for services.tomcat.virtualHosts (which was absent before), but this specification is wrong.

Steps to reproduce

From within release-18.03, import the tomcat module from the master branch, and create a minimal Tomcat configuration that uses virtualHosts:

  imports = [
    /home/paul/nixpkgs-unstable/nixos/modules/services/web-servers/tomcat.nix
  ];
  disabledModules = [ "services/web-servers/tomcat.nix" ];

  services.tomcat.enable = true;
  services.tomcat.virtualHosts = [
    { name = "nixos";
      webapps = [ /deploy/testhost ];
    }
  ];

And see it fails:

paul@nixos> sudo nixos-rebuild switch
building Nix...
building the system configuration...
error: The option `services.tomcat.virtualHosts.[definition 1-entry 1].webapps' defined in `/etc/nixos/play.nix' does not exist.

When using the native module from release-18.03, everything works.

Technical details

  • system: "x86_64-linux"
  • host os: Linux 4.14.59, NixOS, 18.03.133004.a1299c9951b (Impala)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.0.4
  • channels(paul): ""
  • channels(root): "nixos-18.03.133004.a1299c9951b"
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos/nixpkgs
@pvgoran pvgoran changed the title nixos/tomcat: regression in master: type specification for services.tomcat.virtualHosts is wrong nixos/tomcat: regression in master: type specifications for services.tomcat.webapps and services.tomcat.virtualHosts are wrong Aug 2, 2018
@pvgoran pvgoran changed the title nixos/tomcat: regression in master: type specifications for services.tomcat.webapps and services.tomcat.virtualHosts are wrong nixos/tomcat: regression in master: type specification for services.tomcat.virtualHosts is wrong Aug 2, 2018
@pvgoran
Copy link
Contributor Author

pvgoran commented Aug 2, 2018

It's only semi-related, but why on earth is the type of services.tomcat.webapps a list of packages, and not just a list of paths or strings?? It severely limits the configuration options for no apparent gain.

pvgoran added a commit to pvgoran/nixpkgs that referenced this issue Aug 2, 2018
The wrong specification was introduced as part of commit 472f16d.

Fixes NixOS#44361.
@pvgoran
Copy link
Contributor Author

pvgoran commented Aug 3, 2018

For the record, #44370 was an issue about overly restrictive type of services.tomcat.webapps.

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

No branches or pull requests

1 participant