Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions nixos/doc/manual/release-notes/rl-1803.xml
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,9 @@ following incompatible changes:</para>
For <literal>stateVersion = "17.09"</literal> or lower the old behavior is preserved.
</para>
<itemizedlist>
<listitem>
<literal>sound.enable</literal> now defaults to false.
</listitem>
<listitem>
<para>
<literal>matrix-synapse</literal> uses postgresql by default instead of sqlite.
Expand Down
4 changes: 4 additions & 0 deletions nixos/modules/installer/tools/nixos-generate-config.pl
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,10 @@ sub multiLineList {
# Enable CUPS to print documents.
# services.printing.enable = true;

# Enable sound.
# sound.enable = true;
# hardware.pulseaudio.enable = true;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, shouldn't hardware.pulseaudio.enable = true imply sound.enable = true? Or perhaps the other way around, if we want Pulseaudio to be the default sound system.


# Enable the X11 windowing system.
# services.xserver.enable = true;
# services.xserver.layout = "us";
Expand Down
10 changes: 7 additions & 3 deletions nixos/modules/services/audio/alsa.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ in

enable = mkOption {
type = types.bool;
default = true;
defaultText = "!versionAtLeast system.stateVersion \"18.03\"";
description = ''
Whether to enable ALSA sound.
'';
Expand Down Expand Up @@ -78,7 +78,11 @@ in

###### implementation

config = mkIf config.sound.enable {
config = mkMerge [
({
sound.enable = mkDefault (!versionAtLeast config.system.stateVersion "18.03");
})
(mkIf config.sound.enable {

environment.systemPackages = [ alsaUtils ];

Expand Down Expand Up @@ -124,6 +128,6 @@ in
];
};

};
})];

}