nixos: disable sound by default, if stateVersion >= 18.03 (#35355)

Changed files
+14 -3
nixos
doc
manual
release-notes
modules
installer
services
audio
+3
nixos/doc/manual/release-notes/rl-1803.xml
···
</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.
Migration instructions can be found <link xlink:href="https://github.com/matrix-org/synapse/blob/master/docs/postgres.rst#porting-from-sqlite"> here </link>.
+4
nixos/modules/installer/tools/nixos-generate-config.pl
···
# Enable CUPS to print documents.
# services.printing.enable = true;
+
# Enable sound.
+
# sound.enable = true;
+
# hardware.pulseaudio.enable = true;
+
# Enable the X11 windowing system.
# services.xserver.enable = true;
# services.xserver.layout = "us";
+7 -3
nixos/modules/services/audio/alsa.nix
···
enable = mkOption {
type = types.bool;
-
default = true;
+
defaultText = "!versionAtLeast system.stateVersion \"18.03\"";
description = ''
Whether to enable ALSA sound.
'';
···
###### implementation
-
config = mkIf config.sound.enable {
+
config = mkMerge [
+
({
+
sound.enable = mkDefault (!versionAtLeast config.system.stateVersion "18.03");
+
})
+
(mkIf config.sound.enable {
environment.systemPackages = [ alsaUtils ];
···
];
};
-
};
+
})];
}