I’m a NixOS (very) newbie. I’ve enabled flakes and home manager following the ‘NixOs & Flakes Book’.
I’m trying to enable Sway system-wide rather than in home manager following the
wiki topic . (I originally tried the home-manager method first,
but the Sway session did not show up in the gdm greeter, and I gave up on that and thought I would
try the other method, backing out the changes for sway in home.nix.)
I get the following collision error:
[dlkrejsa@squirrel:/etc/nixos]$ sudo nixos-rebuild switch
building the system configuration...
trace: warning: optionsDocBook is deprecated since 23.11 and will be removed in 24.05
trace: warning: optionsDocBook is deprecated since 23.11 and will be removed in 24.05
trace: warning: optionsDocBook is deprecated since 23.11 and will be removed in 24.05
[2 copied (150.9 MiB), 24.5 MiB DL] downloading 'https://github.com/yusdacra/nix-cargo-integration/archive/ed27173cd1b223f598343ea3c15aacb1d140feac.tar.gz'
error: builder for '/nix/store/c4kqnv2fwnsgh6hl6jgc13732f729w98-xdg-portals.drv' failed with exit code 255;
last 1 log lines:
> error: collision between `/nix/store/ihzzkps46yh0npxqbic4i1p1zk96h1nd-xdg-desktop-portal-gtk-1.14.1/share/applications/xdg-desktop-portal-gtk.desktop' and `/nix/store/f74fx3mm8bwcphr5p6cqyslvlql96p3j-xdg-desktop-portal-gtk-1.14.1/share/applications/xdg-desktop-portal-gtk.desktop'
For full logs, run 'nix log /nix/store/c4kqnv2fwnsgh6hl6jgc13732f729w98-xdg-portals.drv'.
error: 1 dependencies of derivation '/nix/store/6y4v0dyrzy6y4d4phn7v10p23qismyj6-etc-pam-environment.drv' failed to build
error: 1 dependencies of derivation '/nix/store/0iysns8m1cxlmz6750qhs9xal9bjxkar-set-environment.drv' failed to build
error: 1 dependencies of derivation '/nix/store/0yq9df3lkh5yhgsf4nnwk5n00bzsnw45-system-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/n5q92d41ig3253wdajp3c6xizgdhcpgh-nixos-system-squirrel-23.11.20231104.85f1ba3.drv' failed to build
Here are possibly relevant bits of my configuration.nix:
services.dbus.enable = true;
xdg.portal = {
enable = true;
wlr.enable = true;
# gtk portal needed to make gtk apps happy
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
};
programs.sway = {
enable = true;
wrapperFeatures.gtk = true;
};
Note, my configuration.nix also contains the ‘dbus-sway-environment’ and ‘configure-gtk’ hacks
shown in the wiki Sway topic.
Any advice about what is going wrong and how to get past this would be appreciated.
Thanks!