mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
nixos: disable sound by default, if stateVersion >= 18.03 (#35355)
This commit is contained in:
parent
664cb083e7
commit
a43e33d0e4
3 changed files with 14 additions and 3 deletions
|
@ -209,6 +209,9 @@ following incompatible changes:</para>
|
||||||
For <literal>stateVersion = "17.09"</literal> or lower the old behavior is preserved.
|
For <literal>stateVersion = "17.09"</literal> or lower the old behavior is preserved.
|
||||||
</para>
|
</para>
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
|
<listitem>
|
||||||
|
<literal>sound.enable</literal> now defaults to false.
|
||||||
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
<literal>matrix-synapse</literal> uses postgresql by default instead of sqlite.
|
<literal>matrix-synapse</literal> uses postgresql by default instead of sqlite.
|
||||||
|
|
|
@ -603,6 +603,10 @@ $bootLoaderConfig
|
||||||
# Enable CUPS to print documents.
|
# Enable CUPS to print documents.
|
||||||
# services.printing.enable = true;
|
# services.printing.enable = true;
|
||||||
|
|
||||||
|
# Enable sound.
|
||||||
|
# sound.enable = true;
|
||||||
|
# hardware.pulseaudio.enable = true;
|
||||||
|
|
||||||
# Enable the X11 windowing system.
|
# Enable the X11 windowing system.
|
||||||
# services.xserver.enable = true;
|
# services.xserver.enable = true;
|
||||||
# services.xserver.layout = "us";
|
# services.xserver.layout = "us";
|
||||||
|
|
|
@ -21,7 +21,7 @@ in
|
||||||
|
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = true;
|
defaultText = "!versionAtLeast system.stateVersion \"18.03\"";
|
||||||
description = ''
|
description = ''
|
||||||
Whether to enable ALSA sound.
|
Whether to enable ALSA sound.
|
||||||
'';
|
'';
|
||||||
|
@ -78,7 +78,11 @@ in
|
||||||
|
|
||||||
###### implementation
|
###### implementation
|
||||||
|
|
||||||
config = mkIf config.sound.enable {
|
config = mkMerge [
|
||||||
|
({
|
||||||
|
sound.enable = mkDefault (!versionAtLeast config.system.stateVersion "18.03");
|
||||||
|
})
|
||||||
|
(mkIf config.sound.enable {
|
||||||
|
|
||||||
environment.systemPackages = [ alsaUtils ];
|
environment.systemPackages = [ alsaUtils ];
|
||||||
|
|
||||||
|
@ -124,6 +128,6 @@ in
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
})];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue