Trying to add the waybar flake to 24.05, after removing waybar from my config. Is there a way to tell where this collision is coming from?
error: builder for '/nix/store/rs802zh6r076kvryn01ycfr42fy8afkx-home-manager-path.drv' failed with exit code 25;
last 1 log lines:
> error: collision between `/nix/store/z683jv87dpfr5gc8ypkhngzbgkbkn4gf-waybar-0.10.3/include/cava/config.h' and `/nix/store/70pp4bsi43jwzgjw0f84hcj9vxpr95ah-waybar-0.11.0+date=2024-10-25_5f26051/include/cava/config.h'
For full logs, run 'nix log /nix/store/rs802zh6r076kvryn01ycfr42fy8afkx-home-manager-path.drv'.
error: 1 dependencies of derivation '/nix/store/im4gj17yh1p0lmhnqnv35141vja0v2hb-home-manager-generation.drv' failed to build
Time for grepping and looking in the repl, home-manager options nixosConfigurations.<hostname>.config.home-manager.users.<user>
(lib.hiPrio waybar)
could get around the collision but it’s better to fix it properly
If it was a collision in nixos then the module system would be more helpful in debugging but I doesn’t seem that home-manager system is that sophisticated nixosConfigurations.<hostname>.options.environment.systemPackages.definitionsWithLocations
why not? hm uses lib.evalModules
, it should work the same and also have .definitionsWithLocations
available.
nix-repl> :p (lib.evalModules { modules = [ { options.a = lib.mkEnableOption ""; } { _file = "foo.nix"; a = true; } { _file = "bar.nix"; a = false; } ]; }).options.a.definitionsWithLocations
[
{
file = "bar.nix";
value = false;
}
{
file = "foo.nix";
value = true;
}
]
To get to what h-m sents i had to go through options.home-manager.users.value.<user>
in which theres no definitionsWithLocations
I don’t understand what you mean here.
Giving the example of standalone hm config:
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{ nixpkgs, home-manager, ... }:
{
homeConfigurations.me = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
modules = [
(
{ config, pkgs, ... }:
{
_file = "mytest.nix";
home = {
username = "me";
homeDirectory = "/home/me";
stateVersion = "24.05";
packages = [
pkgs.hello
pkgs.vim
];
};
}
)
];
};
};
}
nix eval .\#homeConfigurations.me.options.home.packages.definitionsWithLocations
[ { file = "mytest.nix"; value = [ «derivation /nix/store/66xjkspa6p80g7mml5hwk4wmjjb8ivpl-hello-2.12.1.drv» «derivation /nix/store/w36g09agrcqbs9jaskxwpzbd6xvn5bmj-vim-9.1.0765.drv» ]; } { file = "/nix/store/78sgjxjd6p9wns5mriffngcrvxp9sfaa-source/modules/programs/man.nix"; value = [ «derivation /nix/store/zlrqasl2j5wwl722yi0viv9fcyl7413d-man-db-2.13.0.drv» ]; } { file = "/nix/store/78sgjxjd6p9wns5mriffngcrvxp9sfaa-source/modules/misc/xdg-mime.nix"; value = [ «derivation /nix/store/d2kkv8k80cvvjm8v0n96jvammx5714yy-shared-mime-info-2.4.drv» «derivation /nix/store/l1mbh8adw1z231y2r3cllypwyjhy8bg6-dummy-xdg-mime-dirs1.drv» «derivation /nix/store/bcbp0ssvs80n153xcp0x8nzm3sq8scsl-dummy-xdg-mime-dirs2.drv» ]; } { file = "/nix/store/78sgjxjd6p9wns5mriffngcrvxp9sfaa-source/modules/misc/nixgl.nix"; value = [ { _type = "if"; condition = false; content = «derivation /nix/store/pyjcqgiqfp0pjqxf99x2byhgq3jpfzsb-prime-offload.drv»; } { _type = "if"; condition = false; content = «error: expected a set but found null: null»; } { _type = "if"; condition = false; content = «error: expected a set but found null: null»; } { _type = "if"; condition = false; content = «error: expected a set but found null: null»; } { _type = "if"; condition = false; content = «error: expected a set but found null: null»; } ]; } { file = "/nix/store/78sgjxjd6p9wns5mriffngcrvxp9sfaa-source/modules/manual.nix"; value = [ «derivation /nix/store/sf4wj0l8nb845p5g6byl7iamhfv8xx8q-home-configuration-reference-manpage.drv» ]; } { file = "/nix/store/78sgjxjd6p9wns5mriffngcrvxp9sfaa-source/modules/home-environment.nix"; value = [ «derivation /nix/store/bhrp9d96mn5knip9l21v69mznm459sja-hm-session-vars.sh.drv» ]; } ]
seems to work just fine? and I’m sure the same will work with hm as a nixos module, as in that case the module system is managed by nixos