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

authored by Aristid Breitkreuz and committed by Franz Pletz a43e33d0 664cb083

+14 -3
+3
nixos/doc/manual/release-notes/rl-1803.xml
··· 210 </para> 211 <itemizedlist> 212 <listitem> 213 <para> 214 <literal>matrix-synapse</literal> uses postgresql by default instead of sqlite. 215 Migration instructions can be found <link xlink:href="https://github.com/matrix-org/synapse/blob/master/docs/postgres.rst#porting-from-sqlite"> here </link>.
··· 210 </para> 211 <itemizedlist> 212 <listitem> 213 + <literal>sound.enable</literal> now defaults to false. 214 + </listitem> 215 + <listitem> 216 <para> 217 <literal>matrix-synapse</literal> uses postgresql by default instead of sqlite. 218 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
··· 603 # Enable CUPS to print documents. 604 # services.printing.enable = true; 605 606 # Enable the X11 windowing system. 607 # services.xserver.enable = true; 608 # services.xserver.layout = "us";
··· 603 # Enable CUPS to print documents. 604 # services.printing.enable = true; 605 606 + # Enable sound. 607 + # sound.enable = true; 608 + # hardware.pulseaudio.enable = true; 609 + 610 # Enable the X11 windowing system. 611 # services.xserver.enable = true; 612 # services.xserver.layout = "us";
+7 -3
nixos/modules/services/audio/alsa.nix
··· 21 22 enable = mkOption { 23 type = types.bool; 24 - default = true; 25 description = '' 26 Whether to enable ALSA sound. 27 ''; ··· 78 79 ###### implementation 80 81 - config = mkIf config.sound.enable { 82 83 environment.systemPackages = [ alsaUtils ]; 84 ··· 124 ]; 125 }; 126 127 - }; 128 129 }
··· 21 22 enable = mkOption { 23 type = types.bool; 24 + defaultText = "!versionAtLeast system.stateVersion \"18.03\""; 25 description = '' 26 Whether to enable ALSA sound. 27 ''; ··· 78 79 ###### implementation 80 81 + config = mkMerge [ 82 + ({ 83 + sound.enable = mkDefault (!versionAtLeast config.system.stateVersion "18.03"); 84 + }) 85 + (mkIf config.sound.enable { 86 87 environment.systemPackages = [ alsaUtils ]; 88 ··· 128 ]; 129 }; 130 131 + })]; 132 133 }