Closed trya2l closed 2 months ago
The file conflict happens because Home Manager's sway module, when enabled with wayland.windowManager.sway.enable = true;
, automatically generates a ~/.config/sway/config
file via xdg.configFile."sway/config"
: https://github.com/nix-community/home-manager/blob/0a7ffb28e5df5844d0e8039c9833d7075cdee792/modules/services/window-managers/i3-sway/sway.nix#L525C5-L533C9
xdg.configFile."sway/config"
can be disabled with:
xdg.configFile."sway/config".enable = false;
This should stop Home Manager's sway module from creating ~/.config/sway/config
and allow your own home.file
definition to totally control the contents of ~/.config/sway/config
.
I had found a workaround using configuration.nix but this helps me to better understand Nixos and Linux. Thanks!
Are you following the right branch?
Is there an existing issue for this?
Issue description
Hi,
I am new to Nixos, and I am trying to find a way to manage my dotfiles using HM.
For the time being, I'd like to link my config files instead of writing everything with HM options.
However, it is more difficult than I thought.
I was planning to set my sway config like this:
but this brings a conflict with an (idk how) autogenerated sway config file:
.config/sway/config -> /nix/store/gwi1bip1vm74g01a8f62r73yhlps1vpk-home-manager-files/.config/sway/config
Hence, I get this error during
home-manager switch
Also, sway is enable in HM with this line
wayland.windowManager.sway.enable = true;
I would reaallly appreciate some pointers.
Thanks!
Maintainer CC
No response
System information