Getting weird errors or warnings during the rebuild switch
warning: collision between `/nix/store/9cb53mil9r94gv7hq2baaf9b2nk7yzbk-bluez-5.66/sbin/mcaptest' and `/nix/store/fgxxr36bflzyriqn3yx2zn1hfsh494gq-bluez-5.66/sbin/mcaptest'
warning: collision between `/nix/store/9cb53mil9r94gv7hq2baaf9b2nk7yzbk-bluez-5.66/sbin/avinfo' and `/nix/store/fgxxr36bflzyriqn3yx2zn1hfsh494gq-bluez-5.66/sbin/avinfo'
warning: collision between `/nix/store/9cb53mil9r94gv7hq2baaf9b2nk7yzbk-bluez-5.66/sbin/gatttool' and `/nix/store/fgxxr36bflzyriqn3yx2zn1hfsh494gq-bluez-5.66/sbin/gatttool'
warning: collision between `/nix/store/9cb53mil9r94gv7hq2baaf9b2nk7yzbk-bluez-5.66/sbin/bluetooth-player' and `/nix/store/fgxxr36bflzyriqn3yx2zn1hfsh494gq-bluez-5.66/sbin/bluetooth-player'
warning: collision between `/nix/store/9cb53mil9r94gv7hq2baaf9b2nk7yzbk-bluez-5.66/sbin/mesh-cfgtest' and `/nix/store/fgxxr36bflzyriqn3yx2zn1hfsh494gq-bluez-5.66/sbin/mesh-cfgtest'
warning: collision between `/nix/store/9cb53mil9r94gv7hq2baaf9b2nk7yzbk-bluez-5.66/sbin/hcieventmask' and `/nix/store/fgxxr36bflzyriqn3yx2zn1hfsh494gq-bluez-5.66/sbin/hcieventmask'
warning: collision between `/nix/store/9cb53mil9r94gv7hq2baaf9b2nk7yzbk-bluez-5.66/sbin/bluetoothctl' and `/nix/store/fgxxr36bflzyriqn3yx2zn1hfsh494gq-bluez-5.66/sbin/bluetoothctl'
warning: collision between `/nix/store/9cb53mil9r94gv7hq2baaf9b2nk7yzbk-bluez-5.66/sbin/cltest' and `/nix/store/fgxxr36bflzyriqn3yx2zn1hfsh494gq-bluez-5.66/sbin/cltest'
There’s a lot more, but it’s based around similar warnings, but rebuild switch finishes with no errors. Do i uninstall bluez-5.66? I’m not sure whats happening. i also used unstable channel to get bluetooth running
For some reason your system pulls in two different build of bluez-5.66 and nix warns you that e.g. bluetoothctl is found in both, but it can map only one to your /run/current-system/sbin.
Tn this case this is likely no issue[1], but may be if you see this for different programs/versions.
[1] almost all files are identical, as you can see with sha256sum /nix/store/fgxxr36bflzyriqn3yx2zn1hfsh494gq-bluez-5.66/sbin/* /nix/store/9cb53mil9r94gv7hq2baaf9b2nk7yzbk-bluez-5.66/sbin/* | sort
This might show that you don’t have to list bluez explizitly, because it is already pulled in as a dependency or that both versions of bluez are pulled in as dependencies.
Well, here is your problem. If you install two different variants of the same package you get a conflict.
And you are actually installing it a third time
So if you want to use bluez with experimental features enabled, you would just use the following option, rather than listing it in environment.systemPackages explicitly:
Amazing info. But let me see if I understand all of that . So what you’re telling me is to remove the bluez?:
environment.systemPackages = with pkgs; [
[…]
bluez
[…]
bluez5-experimental
];
Remove : hardware.bluetooth.enable = true; and only use this one liner, services.bluetooth.package = pkgs.bluez5-experimental; in the configuration.nix file?
Please clarify if that is what I need to do.
All I need is the normal Bluetooth that comes with Plasma, like other Plasma distros. When i first did a fresh install it would not detect any bluetooth until i added all of those packages etc
The way most NixOS modules work is that they have enable option that defaults to false and when it is not enabled, other options in the module will not have any effect. That is also the case here:
Also I may have this all wrong or acutally screwed everything up, but I have all my programs that i want in the environment section, do i add them in to here instead?
packages = with pkgs; [
firefox
kate
digikam
....
];
};
Those are programs for managing Bluetooth devices. Unless you want them, you can just remove them. Plasma will install their own utilities when you enable Bluetooth support:
packages is not a NixOS option, most of the time you are fine installing programs with environment.systemPackages. System components are bit different because they might need other configuration so specific NixOS option might exist.
The general rule of thumb is:
Search for an option first. If one exists, use it. If a specific option does not exist, use environment.systemPackage.
This is because when a module exists, it is probably because environment.systemPackage is not sufficient to install the software (it requires e.g. setting up users, creating directories in /etc or depends on other services).
On top of that:
Avoid mixing the two installation (another example where it went wrong).
Keep in mind that some modules might enable other modules (e.g. GNOME desktop environment will enable bluetooth and other system components out of the box) so even if you do not enable a module explicitly, you might have done it implicitly.