The option `sound' can no longer be used since it's been removed
Closed this issue ยท 9 comments
Since NixOS/nixpkgs@3eeff54 was merged, evaluating a configuration for the PinePhone fails with the error message "error: The option `sound' can no longer be used since it's been removed. The option was heavily overloaded and can be removed from most configurations.".
All uses of this option should be removed/replaced in Mobile NixOS.
I don't know enough about how sound on the PinePhone actually works to feel comfortable doing this myself.
Maybe this is all that is needed:
--- a/devices/pine64-pinephone/sound.nix
+++ b/devices/pine64-pinephone/sound.nix
@@ -10,9 +10,6 @@ let
ucm2 = "${./ucm2}";
in {
config = lib.mkMerge [
- (lib.mkIf config.sound.enable {
- environment.variables.ALSA_CONFIG_UCM2 = ucm2;
- })
(lib.mkIf (config.hardware.pulseaudio.enable && !config.hardware.pulseaudio.systemWide) {
systemd.user.services.pulseaudio.environment.ALSA_CONFIG_UCM2 = ucm2;
})
--- a/devices/pine64-pinetab/sound.nix
+++ b/devices/pine64-pinetab/sound.nix
@@ -12,9 +12,6 @@ let
ucm2 = "${./ucm2}";
in {
config = lib.mkMerge [
- (lib.mkIf config.sound.enable {
- environment.variables.ALSA_CONFIG_UCM2 = ucm2;
- })
(lib.mkIf (config.hardware.pulseaudio.enable && !config.hardware.pulseaudio.systemWide) {
systemd.user.services.pulseaudio.environment.ALSA_CONFIG_UCM2 = ucm2;
})
Cc @K900.
Did you find a way to solve this issue?
@Luflosi FWIW I applied your change to my local clone of mobile-nixos and was able to go through nixos-rebuild switch
. I can confirm the sound still works (just checked if youtube in browser produces sound - it does). I did not check if calls work though.
I've been using this change for almost 2 months now and calls do work
Would you mind @kazikcz and @donovanglover how you applied this change in your pinephone?
@Thatoo I git cloned the mobile-nixos git repo into /nix/mobile-nixos/
(this path isn't special other then it gets used in another command later), and applied the change, commited, and then ran nixos-rebuild -I mobile-nixos=/nix/mobile-nixos switch
(the mobile-nixos=
is tied to channel name, see nix-channel --list
in case you're wondering). To my limited understanding of nix, this overrides whatever the actual mobile-nixos channel looks like in a given generation (after --update
). IOW this is one time, and if you want to pull in upgrades later, you'll need to do it through your cloned git repo (eg. git fetch + rebase) instead of just nix-channel --update
and make sure you include the -I mobile-nixos=..
override.
If you're using flakes it's as easy as changing the mobile-nixos input to your fork. Example.
Thank you. I'll try on my side then.
With flakes and pointing to your repo, it does work indeed. Thank you @donovanglover .
I have question though. When my pinephone starts, it directly start to the last build. I can't choose among history of builds.
Is it possible to make the pinephone show the list, and let me choose, before starting?
If you mean previous generations you should be able to press the volume button during the first boot screen to enter recovery mode.
Note that my fork is highly experimental and tailored to my use case. No support will be provided for it.