Unverified Commit d75ecf1c authored by nixpkgs-ci[bot]'s avatar nixpkgs-ci[bot] Committed by GitHub
Browse files

Merge master into staging-next

parents 7036be80 94440f4e
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -275,11 +275,11 @@ Alongside many enhancements to NixOS modules and general system improvements, th
  and thus doesn't qualify as default.

- PowerDNS Recursor has been updated to version 5.1.2, which comes with a new YAML configuration format (`recursor.yml`)
  and deprecates the previous format (`recursor.conf`). Accordingly, the NixOS option `services.pdns-recursor.settings`
  has been renamed to [old-settings](#opt-services.pdns-recursor.old-settings) and will be provided for backward compatibility
  until the next NixOS release. Users are asked to migrate their settings to the new [yaml-settings](#opt-services.pdns-recursor.old-settings)
  and deprecates the previous format (`recursor.conf`). Accordingly, the NixOS option {option}`services.pdns-recursor.settings`
  has been renamed to `old-settings` and will be provided for backward compatibility
  until the next NixOS release. Users are asked to migrate their settings to the new `yaml-settings`.
  option following this [guide](https://doc.powerdns.com/recursor/appendices/yamlconversion.html).
  Note that options other than `services.pdns-recursor.settings` are unaffacted by this change.
  Note that options other than {option}`services.pdns-recursor.settings` are unaffacted by this change.

- The `virtualisation.hypervGuest.videoMode` option has been removed. Standard tooling can now be used to configure display modes for Hyper-V VMs.

+2 −0
Original line number Diff line number Diff line
@@ -99,6 +99,8 @@ of pulling the upstream container image from Docker Hub. If you want the old beh

- `pdns` has been updated to version [v5.0.x](https://doc.powerdns.com/authoritative/changelog/5.0.html), which introduces breaking changes. Check out the [Upgrade Notes](https://doc.powerdns.com/authoritative/upgrading.html#to-5-0-0) for details.

- In the PowerDNS Recursor module, following the deprecation period started with NixOS 25.05, the option {option}`services.pdns-recursor.old-settings` has been removed and {option}`services.pdns-recursor.yaml-settings` consequently renamed to [](#opt-services.pdns-recursor.settings).

- `services.angrr` now uses TOML for configuration. Define policies with `services.angrr.settings` (generate TOML file) or point to a file using `services.angrr.configFile`. The legacy options `services.angrr.period`, `services.angrr.ownedOnly`, and `services.angrr.removeRoot` have been removed. See `man 5 angrr` and the description of `services.angrr.settings` options for examples and details.

- `services.pingvin-share` has been removed as the `pingvin-share.backend` package was broken and the project was archived upstream.
+4 −0
Original line number Diff line number Diff line
@@ -134,6 +134,10 @@ in
    systemd.sockets.restic-rest-server = {
      listenStreams = [ cfg.listenAddress ];
      wantedBy = [ "sockets.target" ];
      socketConfig = {
        ReusePort = true;
        FreeBind = true;
      };
    };

    systemd.tmpfiles.rules = lib.mkIf cfg.privateRepos [
+20 −52
Original line number Diff line number Diff line
@@ -48,23 +48,6 @@ let
    }
  );

  configFile =
    if cfg.old-settings != { } then
      # Convert recursor.conf to recursor.yml and merge it
      let
        conf = pkgs.writeText "recursor.conf" (
          concatStringsSep "\n" (mapAttrsToList (name: val: "${name}=${serialize val}") cfg.old-settings)
        );

        yaml = settingsFormat.generate "recursor.yml" cfg.yaml-settings;
      in
      pkgs.runCommand "recursor-merged.yml" { } ''
        ${pkgs.pdns-recursor}/bin/rec_control show-yaml --config ${conf} > override.yml
        ${pkgs.yq-go}/bin/yq '. *= load("override.yml")' ${yaml} > $out
      ''
    else
      settingsFormat.generate "recursor.yml" cfg.yaml-settings;

in
{
  options.services.pdns-recursor = {
@@ -196,30 +179,7 @@ in
      '';
    };

    old-settings = mkOption {
      type = configType;
      default = { };
      example = literalExpression ''
        {
          loglevel = 8;
          log-common-errors = true;
        }
      '';
      description = ''
        Older PowerDNS Recursor settings. Use this option to configure
        Recursor settings not exposed in a NixOS option or to bypass one.
        See the full documentation at
        <https://doc.powerdns.com/recursor/settings.html>
        for the available options.

        ::: {.warning}
        This option is provided for backward compatibility only
        and will be removed in the next release of NixOS.
        :::
      '';
    };

    yaml-settings = mkOption {
    settings = mkOption {
      type = settingsFormat.type;
      default = { };
      example = literalExpression ''
@@ -249,11 +209,12 @@ in

  config = mkIf cfg.enable {

    environment.etc."/pdns-recursor/recursor.yml".source = configFile;
    environment.etc."/pdns-recursor/recursor.yml".source =
      settingsFormat.generate "recursor.yml" cfg.settings;

    networking.resolvconf.useLocalResolver = lib.mkDefault true;

    services.pdns-recursor.yaml-settings = {
    services.pdns-recursor.settings = {
      incoming = mkDefaultAttrs {
        listen = cfg.dns.address;
        port = cfg.dns.port;
@@ -301,15 +262,6 @@ in

    users.groups.pdns-recursor = { };

    warnings = lib.optional (cfg.old-settings != { }) ''
      pdns-recursor has changed its configuration file format from pdns-recursor.conf
      (mapped to `services.pdns-recursor.old-settings`) to the newer pdns-recursor.yml
      (mapped to `services.pdns-recursor.yaml-settings`).

      Support for the older format will be removed in a future version, so please migrate
      your settings over. See <https://doc.powerdns.com/recursor/yamlsettings.html>.
    '';

  };

  imports = [
@@ -320,16 +272,32 @@ in
    ] "To change extra Recursor settings use services.pdns-recursor.settings instead.")

    (mkRenamedOptionModule
      [
        "services"
        "pdns-recursor"
        "yaml-settings"
      ]
      [
        "services"
        "pdns-recursor"
        "settings"
      ]
    )

    (mkRemovedOptionModule
      [
        "services"
        "pdns-recursor"
        "old-settings"
      ]
      ''
        pdns-recursor has changed its configuration file format from pdns-recursor.conf
        (mapped to `services.pdns-recursor.old-settings`) to the newer pdns-recursor.yml
        (mapped to `services.pdns-recursor.settings`).

        Support for the older format has been removed, please migrate your settings over.
        See <https://doc.powerdns.com/recursor/yamlsettings.html>.
      ''
    )
  ];

+11 −11
Original line number Diff line number Diff line
@@ -133,13 +133,6 @@ in

        virtualHosts.${cfg.hostname} = {
          locations = {
            # resources that are generated and thus cannot be taken from the cfg.package yet:
            "~ ^(\\/[\\d]+\\.[\\d]+\\.[\\d]+[\\.|-][\\w]+)?\\/(sdkjs/common/AllFonts.js)$".extraConfig = ''
              proxy_pass http://onlyoffice-docservice/$2$3;
            '';
            "~ ^(\\/[\\d]+\\.[\\d]+\\.[\\d]+[\\.|-][\\w]+)?\\/(fonts/.*)$".extraConfig = ''
              proxy_pass http://onlyoffice-docservice/$2$3;
            '';
            # /etc/nginx/includes/ds-docservice.conf
            # disable caching for api.js
            "~ ^(\\/[\\d]+\\.[\\d]+\\.[\\d]+[\\.|-][\\w]+)?\\/(web-apps\\/apps\\/api\\/documents\\/api\\.js)$".extraConfig =
@@ -278,7 +271,7 @@ in
        serviceConfig = {
          # needs to be ran wrapped in FHS for now
          # because the default config refers to many FHS paths
          ExecStart = "${cfg.package.fhs}/bin/onlyoffice-wrapper ${cfg.package.fileconverter}/bin/fileconverter /run/onlyoffice/config";
          ExecStart = "${cfg.package.fhs}/bin/onlyoffice-wrapper ${cfg.package.fileconverter}/bin/fileconverter";
          Group = "onlyoffice";
          Restart = "always";
          RuntimeDirectory = "onlyoffice";
@@ -336,8 +329,10 @@ in
              ' /run/onlyoffice/config/default.json | sponge /run/onlyoffice/config/default.json

            chmod u+w /run/onlyoffice/config/production-linux.json
            jq '.FileConverter.converter.x2tPath = "${cfg.x2t}/bin/x2t"' \
              /run/onlyoffice/config/production-linux.json | sponge /run/onlyoffice/config/production-linux.json
            jq '
              .log.filePath = "/run/onlyoffice/config/log4js/production.json" |
              .FileConverter.converter.x2tPath = "${cfg.package.x2t-with-fonts-and-themes}/bin/x2t"
              ' /run/onlyoffice/config/production-linux.json | sponge /run/onlyoffice/config/production-linux.json

            chmod u+w /run/onlyoffice/config/log4js/production.json
            jq '.categories.default.level = "${cfg.loglevel}"' \
@@ -360,8 +355,13 @@ in
          ];
          requires = [ "postgresql.target" ];
          wantedBy = [ "multi-user.target" ];
          environment = {
            NODE_CONFIG_DIR = "/run/onlyoffice/config";
            NODE_DISABLE_COLORS = "1";
            NODE_ENV = "production-linux";
          };
          serviceConfig = {
            ExecStart = "${cfg.package.fhs}/bin/onlyoffice-wrapper ${cfg.package.docservice}/bin/docservice /run/onlyoffice/config";
            ExecStart = "${cfg.package.fhs}/bin/onlyoffice-wrapper ${cfg.package.docservice}/bin/docservice";
            ExecStartPre = [ onlyoffice-prestart ];
            Group = "onlyoffice";
            Restart = "always";
Loading