nixos: disable sound by default, if stateVersion >= 18.03 (#35355)
This commit is contained in:
parent
664cb083e7
commit
a43e33d0e4
|
@ -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.
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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
|
|||
];
|
||||
};
|
||||
|
||||
};
|
||||
})];
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue