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

Merge master into staging-next

parents 490a861f ca6df587
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -319,7 +319,7 @@ let
          if final.isAarch32 then
            "arm"
          else if final.isAarch64 then
            "aarch64"
            "aarch64${optionalString final.isBigEndian "_be"}"
          else if final.isS390 && !final.isS390x then
            null
          else if final.isx86_64 then
+6 −0
Original line number Diff line number Diff line
@@ -16749,6 +16749,12 @@
    githubId = 952712;
    name = "Matt Christ";
  };
  mattcurrie = {
    email = "me+nixpkgs@mattcurrie.com";
    github = "mattcurrie";
    githubId = 455505;
    name = "Matt Currie";
  };
  mattdef = {
    email = "mattdef@gmail.com";
    github = "mattdef";
+37 −11
Original line number Diff line number Diff line
@@ -7,13 +7,23 @@
let
  cfg = config.services.odoo;
  format = pkgs.formats.ini { };

  inherit (config.system) stateVersion;
in
{
  options = {
    services.odoo = {
      enable = lib.mkEnableOption "odoo, an open source ERP and CRM system";

      package = lib.mkPackageOption pkgs "odoo" { };
      package = lib.mkOption {
        type = lib.types.package;
        description = "Which package to use for the Odoo instance.";
        relatedPackages = [
          "odoo17"
          "odoo18"
          "odoo19"
        ];
      };

      addons = lib.mkOption {
        type = with lib.types; listOf package;
@@ -100,7 +110,22 @@ in
        };
      };

      services.odoo.settings.options = {
      services.odoo = {
        package = lib.mkDefault (
          if pkgs ? odoo then
            throw ''
              The `pkgs.odoo`-attribute has been removed. If it's supposed to be the default
              odoo defined in an overlay, please set `services.odoo.package` to
              `pkgs.odoo`.
            ''
          else if lib.versionOlder stateVersion "25.05" then
            pkgs.odoo18
          else if lib.versionOlder stateVersion "25.11" then
            pkgs.odoo18
          else
            pkgs.odoo19
        );
        settings.options = {
          data_dir = "/var/lib/private/odoo/data";
          proxy_mode = cfg.domain != null;
          # Disable the database manager by default
@@ -110,6 +135,7 @@ in
        // (lib.optionalAttrs (cfg.addons != [ ]) {
          addons_path = lib.concatMapStringsSep "," lib.escapeShellArg cfg.addons;
        });
      };

      users.users.odoo = {
        isSystemUser = true;
+1 −0
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ let
in
writeScriptBin "nvidia-cdi-generator" ''
  #! ${runtimeShell}
  set -e -u -o pipefail

  function cdiGenerate {
    ${lib.getExe' nvidia-container-toolkit "nvidia-ctk"} cdi generate \
+22 −0
Original line number Diff line number Diff line
@@ -54,6 +54,19 @@ in
        description = "Whether to enable Searx, the meta search engine.";
      };

      openFirewall = mkOption {
        type = types.bool;
        default = false;
        description = ''
          Whether to open the port in the firewall.
          Enabling this option adds the port specified in {option}`services.settings.server.port` to {option}`networking.firewall.allowedTCPPorts`.

          ::: {.note}
          When this option is set to true, {option}`services.settings.server.port` must be set as well or an error will be thrown.
          :::
        '';
      };

      domain = mkOption {
        type = types.str;
        description = ''
@@ -244,6 +257,13 @@ in
  ];

  config = mkIf cfg.enable {
    assertions = [
      {
        assertion = cfg.openFirewall -> cfg.settings ? server.port;
        message = "services.searx.settings.server.port must be set when openFirewall is enabled.";
      }
    ];

    environment = {
      etc = {
        "searxng/favicons.toml" = lib.mkIf (cfg.faviconsSettings != { }) {
@@ -392,6 +412,8 @@ in
        isSystemUser = true;
      };
    };

    networking.firewall = lib.mkIf cfg.openFirewall { allowedTCPPorts = [ cfg.settings.server.port ]; };
  };

  meta.maintainers = with maintainers; [
Loading