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

This commit is contained in:
Aristid Breitkreuz 2018-02-22 23:06:31 +01:00 committed by Franz Pletz
parent 664cb083e7
commit a43e33d0e4
3 changed files with 14 additions and 3 deletions

View File

@ -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.

View File

@ -603,6 +603,10 @@ $bootLoaderConfig
# 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";

View File

@ -21,7 +21,7 @@ in
enable = mkOption {
type = types.bool;
default = true;
defaultText = "!versionAtLeast system.stateVersion \"18.03\"";
description = ''
Whether to enable ALSA sound.
'';
@ -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 ];
@ -124,6 +128,6 @@ in
];
};
};
})];
}