Skip to content

Commit

Permalink
nixos: disable sound by default, if stateVersion > 18.03
Browse files Browse the repository at this point in the history
  • Loading branch information
aristidb committed Feb 22, 2018
1 parent d328ba7 commit ea48c41
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
3 changes: 3 additions & 0 deletions nixos/doc/manual/release-notes/rl-1803.xml
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
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;
# Enable the X11 windowing system.
# services.xserver.enable = true;
# services.xserver.layout = "us";
Expand Down
5 changes: 3 additions & 2 deletions nixos/modules/services/audio/alsa.nix
Expand Up @@ -21,7 +21,6 @@ in

enable = mkOption {
type = types.bool;
default = true;
description = ''
Whether to enable ALSA sound.
'';
Expand Down Expand Up @@ -78,7 +77,9 @@ in

###### implementation

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

environment.systemPackages = [ alsaUtils ];

Expand Down

0 comments on commit ea48c41

Please sign in to comment.