Closed RAVENz46 closed 4 months ago
edit: I realized that unset
nix.settings.auto-optimise-store = true;
can avoid it temporary.
That... sounds highly suspicious 🤔
Can you share more details of your config? I'll try to repro when i get time
Here is part of my config. I hope reproduce issue only with these. Please let me know if you need entire my config, I will upload it (I haven't uploaded it to github yet because I still need to brush up).
And I also realized that I cannot finish build even unset nix.settings.auto-optimise-store = true;
.
I'll have to try it after remove gnome and see what happen.
After removing gnome, everything works fine, so issue is caused by gnome. And in gnome module, it does
(pkgs.xdg-desktop-portal-gtk.override {
# Do not build portals that we already have.
buildPortalsInGnome = false;
})
Any suggestions on how to get around this? I'm hoping to have both gnome and cosmic available at the login screen, so that I can jump between testing and a stable DE.
Any suggestions on how to get around this? I'm hoping to have both gnome and cosmic available at the login screen, so that I can jump between testing and a stable DE.
I'm planning to implement a work-around tonight hopefully. It's really annoying that GNOME does this though as it'll impact any DEs that use the GTK portal (i.e. it's not a this-repo-specific or even a COSMIC-specific problem)
Yeah I was wondering if the snippet @RAVENz46 pointed out, would impact other DEs. Thanks and no rush. Still learning the nix language, so probably not much of a help for PRs. Can help with testing though.
I get the following error:
error: builder for '/nix/store/0m1biyldhinwcdh3wklpss96xpv2mz0c-iced_core-0.12.0.drv' failed with exit code 1;
last 10 log lines:
> Traceback (most recent call last):
> File "/nix/store/r4rksmam6h4bc72nf3dpwgq79yixcykc-replace-workspace-values", line 108, in <module>
> main()
> File "/nix/store/r4rksmam6h4bc72nf3dpwgq79yixcykc-replace-workspace-values", line 88, in main
> changed |= replace_key(
> ^^^^^^^^^^^^
> File "/nix/store/r4rksmam6h4bc72nf3dpwgq79yixcykc-replace-workspace-values", line 32, in replace_key
> workspace_copy = workspace_manifest[section][key]
> ~~~~~~~~~~~~~~~~~~^^^^^^^^^
> KeyError: 'package'
For full logs, run 'nix log /nix/store/0m1biyldhinwcdh3wklpss96xpv2mz0c-iced_core-0.12.0.drv'.
error: 1 dependencies of derivation '/nix/store/illlax0r0pjg6kr1fgj7j86xy6aq75wh-cargo-vendor-dir.drv' failed to build
error: 1 dependencies of derivation '/nix/store/xishanf9rpf0h8lm9mbkcn0pgk92smcm-cargo-vendor-dir.drv' failed to build
error: 1 dependencies of derivation '/nix/store/z3y2aacf1n7ljpkr8j9q87wfpycr8ggs-cargo-vendor-dir.drv' failed to build
error: 1 dependencies of derivation '/nix/store/bx8harjb5jb5d0dakvdkfwxaxsazlbrn-cosmic-applets-0-unstable-2024-03-12.drv' failed to build
error: 1 dependencies of derivation '/nix/store/pwjyddc0v8nhl1wivbx7byr64pjr7pa4-cosmic-bg-0-unstable-2024-03-12.drv' failed to build
error: 1 dependencies of derivation '/nix/store/97c7cz5avkb59c5rmhni9w844irz43rv-cosmic-settings-0-unstable-2024-03-12.drv' failed to build
error: 1 dependencies of derivation '/nix/store/ky6jw5ppkbzm2fw6a804qk60kl8yvba7-cosmic-applets-0-unstable-2024-03-12_fish-completions.drv' failed to build
error: 1 dependencies of derivation '/nix/store/55sr1gbcyaj19ci65cx3xkx9jhz120ir-man-paths.drv' failed to build
error: 1 dependencies of derivation '/nix/store/ajdp408qmfmhj3xp1gghqsa9sf6xdhhm-system-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/nj9s5wxa302bryhbajz61f080899q85s-wrap-cosmic-apps-hook.drv' failed to build
error: 1 dependencies of derivation '/nix/store/v0ds3m08vldnkadsvm0ncwqg4yiv9a3x-nixos-system-nixos-23.11.20240305.880992d.drv' failed to build
But my flake.nix inputs does look like so:
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
nixos-cosmic = {
url = "github:lilyinstarlight/nixos-cosmic";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
};
@cafetestrest You need to use nixos-unstable
for your system for COSMIC for now, not just nixos-23.11
(setting the flake input follows
is insufficient and won't change what the NixOS module uses)
Feel free to open a new issue if you continue to have issues with nixos-unstable
as well!
I checked other DEs modules.
xdg-desktop-portal-gtk
with override
xdg-desktop-portal-gtk
without override
So this issue may happen with the former.
@lilyinstarlight did you find a workaround?
I ran into the same issue with Cosmic and Gnome enabled. Changing https://github.com/lilyinstarlight/nixos-cosmic/blob/f7b84cb8a0c081a36c2692cbdcb6aee122f27e77/nixos/cosmic/module.nix#L65-L68 to
extraPortals = with pkgs; [
xdg-desktop-portal-cosmic
] ++ lib.optional (!config.services.xserver.desktopManager.gnome.enable) pkgs.xdg-desktop-portal-gtk;
fixes it for Gnome.
Seems like build fails whenever one DE uses xdg-desktop-portal-gtk as-is and one with override buildPortalsInGnome = false;
.
@lxwntr could you make a PR to help @lilyinstarlight and help all nixos users to be able to benefit from your work?
My change currently only works for Gnome but I could expand it to other DEs on @RAVENz46 s list and create a PR. It would be a workaround for a problem better solved in nixpkgs, but I assume the Cosmic portals will at one point replace all functionality of the GTK portals, so it would be temporary.
Side note: I just tried to build a few combinations of DEs from the above list and they failed with a environment.sessionVariables.NIX_GSETTINGS_OVERRIDES_DIR
option conflict before getting a chance to fail with the portal conflict. Trying out a different (GTK-based) DEs in NixOS currently seems to require switching between different generations.
Trying out a different (GTK-based) DEs in NixOS currently seems to require switching between different generations.
You can use specialisations instead as well to keep multiple in the same generation
Trying out a different (GTK-based) DEs in NixOS currently seems to require switching between different generations.
You can use specialisations instead as well to keep multiple in the same generation
@lxwntr 's PR has the advantage of allowing to switch from the display manager instead of having to reboot :) (at least it seems to work for me with gdm)
You can use specialisations instead as well to keep multiple in the same generation
@lxwntr 's PR has the advantage of allowing to switch from the display manager instead of having to reboot :) (at least it seems to work for me with gdm)
I mean you can hack that up yourself with specialisations (they've never required reboot), but it is unfortunately manual
Fail to rebuild system with this error. Currently I use gnome.
edit: I realized that unset
nix.settings.auto-optimise-store = true;
can avoid it temporary.