dotfiles icon indicating copy to clipboard operation
dotfiles copied to clipboard

Clean up remaining dotfiles that don't comply with XDG_BASE_DIRS

Open TLATER opened this issue 4 years ago • 8 comments

Likely feasible

  • [ ] ~/.nvidia-settings-rc
    • Yep, set by the nvidia driver. There's an open issue for changing this, but I think a wrapper around the binary might work
  • [ ] ~/.maptool*
    • Should be possible to change by changing a config file in the package, but will need to override that
  • [ ] ~/.gtkrc-2.0
    • Created by home-manager, likely possible to change
  • [ ] ~/.gnupg
    • GPGHOME exists, just need to make sure ssh connects n stuff

Less feasible

  • [ ] ~/.mozilla
  • [ ] ~/.pki
    • Also caused by Firefox. Seriously, I need a different browser. Maybe I will switch to chrome after all. Or maybe patch Firefox.
  • [ ] ~/.java
    • I set _JAVA_OPTIONS, not sure why this is created anyway. Seems it's a bug
  • [ ] ~/.profile
    • Fairly standard generic "env variable" definition point, unlikely to be able to change this one
  • [ ] ~/.ssh
  • [ ] ~/.steam*
    • hard-coded in steam backups by certain game developers

TLATER avatar Mar 08 '21 23:03 TLATER

Hey I was doing the same thing, and I found this guide from Arch really useful.

https://wiki.archlinux.org/title/XDG_Base_Directory

And yes I want to remove .nix-* as well, thats well I bumped into your issue again.

winston0410 avatar Sep 26 '21 19:09 winston0410

Heh, thanks, I've already fixed all things that were recorded on that wiki page, what's left are things that were either inaccurate, tied to nixos or not listed there :)

There was an unofficial roadmap for nix that included some stabilization of nix flakes, which would likely make ditching ~/.nix* easier to achieve. Of course this is behind schedule already (as always with software), but there is at least a push to finally making flakes happen. Once they're a little further down the road I'll probably revisit that issue upstream.

There are also some projects floating around that create modules for nixos which enable all these environment variables; it's worth looking into them, though when I started this they weren't yet usable enough. It might be worth contributing to those projects instead nowadays.

TLATER avatar Sep 26 '21 21:09 TLATER

Good:)

There are also some projects floating around that create modules for nixos which enable all these environment variables; it's worth looking into them, though when I started this they weren't yet usable enough. It might be worth contributing to those projects instead nowadays.

Can you name those? I don't want to do this by myself alone. It is tedious.

And I wonder if you have moved your ~/.Xresources into XDG CONFIG HOME? I have done that yesterday, ok with xrdb, but it is not picked up by many softwares I use (wezterm and brave). And I cannot find any environment variable for its path.

winston0410 avatar Sep 27 '21 08:09 winston0410

Don't know the projects off the top of my head, sorry. I've not moved my Xresources yet, but only xrdb should read it; if other applications do they're doing it wrong.

TLATER avatar Sep 27 '21 09:09 TLATER

I have just created a flake here, feel free to add anything in!

https://github.com/winston0410/xdg.nix

winston0410 avatar Sep 27 '21 16:09 winston0410

I put it in my configuration.nix to disable .esd_auth:

hardware.pulseaudio.extraConfig = "unload-module module-esound-protocol-unix";

Something that's very annoying for me is the .serverauth.* file, but I don't know how to disable it.

wesleyjrz avatar Oct 22 '22 16:10 wesleyjrz

About .pki you can just move it to ~/.local/share/pki and it will work out-of-the-box with Firefox, but Chrome is hardcoded and keeps creating it in ~/.pki

wesleyjrz avatar Oct 22 '22 16:10 wesleyjrz

Nice to know, thanks!

TLATER avatar Oct 23 '22 22:10 TLATER