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

Merge master into staging-next

parents 7da115db d08f00a9
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -128,6 +128,8 @@ See <https://github.com/NixOS/nixpkgs/issues/481673>.

- [services.resolved](#opt-services.resolved.enable) module was converted to RFC42-style settings. The moved options have also been renamed to match the upstream names. Aliases mean current configs will continue to function, but users should move to the new options as convenient.

- Support for Bluetooth audio based on `bluez-alsa` has been added to the `hardware.alsa` module. It can be enabled with the new [enableBluetooth](#opt-hardware.alsa.enableBluetooth) option.

- `services.openssh` now supports generating host SSH keys by setting `services.openssh.generateHostKeys = true` while leaving `services.openssh.enable` disabled.  This is particularly useful for systems that have no need of an SSH daemon but want SSH host keys for other purposes such as using agenix or sops-nix.

- `services.slurm` now supports slurmrestd usage through the `services.slurm.rest` NixOS options.
+47 −3
Original line number Diff line number Diff line
@@ -44,9 +44,15 @@ let
    in
    lib.forEach options (i: "options ${i.driver} index=${toList i.ids} id=${toList i.names}");

  defaultDeviceVars = {
  pluginsPath = pkgs.symlinkJoin {
    name = "alsa-with-plugins";
    paths = cfg.plugins;
  };

  alsaVariables = {
    "ALSA_AUDIO_OUT" = cfg.defaultDevice.playback;
    "ALSA_AUDIO_IN" = cfg.defaultDevice.capture;
    "ALSA_PLUGIN_DIR" = lib.mkIf (cfg.plugins != [ ]) "${pluginsPath}/lib/alsa-lib";
  };

in
@@ -106,6 +112,8 @@ in

    enableOSSEmulation = lib.mkEnableOption "the OSS emulation";

    enableBluetooth = lib.mkEnableOption "Bluetooth audio support via BlueALSA";

    enableRecorder = lib.mkOption {
      type = lib.types.bool;
      default = false;
@@ -125,6 +133,15 @@ in
      '';
    };

    plugins = lib.mkOption {
      type = lib.types.listOf lib.types.package;
      default = [ ];
      example = lib.literalExpression "[ pkgs.bluez-alsa ]";
      description = ''
        List of ALSA plugins to be added to the search path.
      '';
    };

    defaultDevice.playback = lib.mkOption {
      type = lib.types.str;
      default = "";
@@ -392,8 +409,8 @@ in
      };

      # Set default PCM devices
      environment.sessionVariables = defaultDeviceVars;
      systemd.globalEnvironment = defaultDeviceVars;
      environment.sessionVariables = alsaVariables;
      systemd.globalEnvironment = alsaVariables;

      environment.etc."asound.conf".text = cfg.config;

@@ -412,6 +429,33 @@ in
      environment.systemPackages = [ pkgs.alsa-utils ];
    })

    (lib.mkIf (cfg.enable && cfg.enableBluetooth) {

      users.users.bluealsa = {
        description = "BlueALSA daemons user";
        isSystemUser = true;
        group = "audio";
      };

      # Link ALSA configuration
      environment.etc."alsa/conf.d/20-bluealsa.conf".source =
        "${pkgs.bluez-alsa}/etc/alsa/conf.d/20-bluealsa.conf";

      # Install plugin
      hardware.alsa.plugins = [ pkgs.bluez-alsa ];

      # Install CLI tools and systemd units
      environment.systemPackages = [ pkgs.bluez-alsa ];
      systemd.packages = [ pkgs.bluez-alsa ];

      # See Nixpkgs issue #81138
      systemd.services."bluealsa".wantedBy = [ "bluetooth.target" ];

      # Note: bluealsa-aplay is available but we don't start it
      # by default, it's only needed to make the machine act as
      # bluetooth speaker
    })

    (lib.mkIf config.hardware.alsa.enablePersistence {

      # Install udev rules for restoring card settings on boot
+6 −7
Original line number Diff line number Diff line
@@ -406,15 +406,14 @@ in
            http = {
              # https://www.home-assistant.io/integrations/http/
              server_host = mkOption {
                type = types.nullOr (types.either types.str (types.listOf types.str));
                default = null;
                example = [
                  "::1"
                  "127.0.0.1"
                type = types.either types.str (types.listOf types.str);
                default = [
                  "0.0.0.0"
                  "::"
                ];
                example = "::1";
                description = ''
                  Only listen to incoming requests on specific IP/host.
                  The option is unset by default, meaning that Home Assistant listens on all available addresses.
                  Only listen to incoming requests on specific IP/host. The default listed assumes support for IPv4 and IPv6.
                '';
              };

+13 −10
Original line number Diff line number Diff line
@@ -356,16 +356,6 @@ in
      "d '${cfg.stateDir}/public/plugin_assets' 0750 ${cfg.user} ${cfg.group} - -"
      "d '${cfg.stateDir}/themes' 0750 ${cfg.user} ${cfg.group} - -"
      "d '${cfg.stateDir}/tmp' 0750 ${cfg.user} ${cfg.group} - -"

      "d /run/redmine/public - - - - -"
      "L+ /run/redmine/config - - - - ${cfg.stateDir}/config"
      "L+ /run/redmine/files - - - - ${cfg.stateDir}/files"
      "L+ /run/redmine/log - - - - ${cfg.stateDir}/log"
      "L+ /run/redmine/plugins - - - - ${cfg.stateDir}/plugins"
      "L+ /run/redmine/public/assets - - - - ${cfg.stateDir}/public/assets"
      "L+ /run/redmine/public/plugin_assets - - - - ${cfg.stateDir}/public/plugin_assets"
      "L+ /run/redmine/themes - - - - ${cfg.stateDir}/themes"
      "L+ /run/redmine/tmp - - - - ${cfg.stateDir}/tmp"
    ];

    systemd.services.redmine = {
@@ -392,6 +382,19 @@ in
        ++ lib.optional cfg.components.ghostscript ghostscript;

      preStart = ''
        # Create symlinks for the basic directory layout the redmine package
        # expects. This part must be done in preStart rather than tmpfiles,
        # because /run/redmine is re-created when the service is restarted
        mkdir /run/redmine/public
        ln -s "${cfg.stateDir}/config" /run/redmine/config
        ln -s "${cfg.stateDir}/files" /run/redmine/files
        ln -s "${cfg.stateDir}/log" /run/redmine/log
        ln -s "${cfg.stateDir}/plugins" /run/redmine/plugins
        ln -s "${cfg.stateDir}/public/assets" /run/redmine/public/assets
        ln -s "${cfg.stateDir}/public/plugin_assets" /run/redmine/public/plugin_assets
        ln -s "${cfg.stateDir}/themes" /run/redmine/themes
        ln -s "${cfg.stateDir}/tmp" /run/redmine/tmp

        rm -rf "${cfg.stateDir}/plugins/"*
        rm -rf "${cfg.stateDir}/themes/"*

+0 −1
Original line number Diff line number Diff line
@@ -625,7 +625,6 @@ in

      services.crowdsec.settings.general = {
        common = {
          daemonize = false;
          log_media = "stdout";
        };
        config_paths = {
Loading