-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does nix has a plan to comply with XDG Base Directory Spec? #1079
Comments
I assume you're referring to New files do respect the XDG. For example, Nix stores various cache files in |
Hmm.. I just install nix & nixos a week ago, so it should be "new" right 😄 I found three files, and yes, those are, Then, how can I help on this? I love |
@edolstra used past tense when he said "However, most of these files will become obsolete with the new Nix command line interface.", so perhaps you could assume it's either not developed yet or isn't released yet. |
@SShrike okay then. |
@edolstra well we could do what git does to maintain backwards compatibility. Use |
Are there any plans to introduce something like @nhooyr described? |
I don't think anyone is working on this project, or working on a plan for this project. It might be possible that a PR implementing that behavior + docs would be accepted. |
I'm not opposed to it, but I'm not sure it's really worth it. It's likely to cause all sorts of confusion (e.g. when ~/.nix-channels and ~/.local/share/nix/channels both exist). |
@edolstra Your fist comment in this thread mentioned new Nix command line interface. Is this currently being worked on? |
Yes, the new |
So the plan is that new nix command will no longer use |
Are there any updates here? Would definitely appreciate this. |
Yeah, it would be good to try some new directories for the old stuff, c.f. Git supporting |
4 years ago, it was stated that these would become obsolete. What's going on? My home being cluttered is so incredibly annoying... |
I marked this as stale due to inactivity. → More info |
This is definitely not stale, it'll have to happen at some point |
On the opposite end of this, I'm using the new |
Can someone expand on this? |
Probably:
As a note for me It'd be good to get a list of empty or |
That said, I now realize this is likely because I'm using flakes, so neither my user nor root are using any channels. Not that that's any less annoying, of course. If you are also using flakes, and still have debris in there, keep in mind that you likely should delete those channels manually at some point. |
Yeah I've switched to flakes on a machine that wasn't originally using them. Would none of this come from this config?: mkRegistry = attrs: lib.mapAttrs (_: flake: { inherit flake; }) attrs;
defaultModules = [
{
nix = {
nixPath = [
"nixpkgs=${nixpkgs}"
"home-manager=${home-manager}"
"nixpkgs-master=${nixpkgs-master}"
"nur=${nur}"
];
registry = mkRegistry { inherit nixpkgs home-manager nixpkgs-master nur; };
};
}
]; |
Unlikely, given I have those settings set too: https://github.com/TLATER/nixos-hosts/blob/master/flake.nix#L47
|
Everyone who's interested, please help review and test #5588 |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/tweag-nix-dev-update-22/16251/1 |
Now if you set |
I'm trying to figure out how to install nix and take advantage of this feature.. I have I use the snippet But at the end it tells me to source |
Hi @Ramblurr , we're working on better documentation and support for As for your problem, you should do |
thanks @balsoft ! That solved it. |
Does it exist any progress of |
@Freed-Wu yes. Please set |
After $ print -l $path
/run/wrappers/bin
/home/wzy/.nix-profile/bin
/etc/profiles/per-user/wzy/bin
/nix/var/nix/profiles/default/bin
/run/current-system/sw/bin
$ print -l $fpath
/home/wzy/.nix-profile/share/zsh/site-functions
/home/wzy/.nix-profile/share/zsh/5.9/functions
/home/wzy/.nix-profile/share/zsh/vendor-completions
/etc/profiles/per-user/wzy/share/zsh/site-functions
/etc/profiles/per-user/wzy/share/zsh/5.9/functions
/etc/profiles/per-user/wzy/share/zsh/vendor-completions
/nix/var/nix/profiles/default/share/zsh/site-functions
/nix/var/nix/profiles/default/share/zsh/5.9/functions
/nix/var/nix/profiles/default/share/zsh/vendor-completions
/run/current-system/sw/share/zsh/site-functions
/run/current-system/sw/share/zsh/5.9/functions
/run/current-system/sw/share/zsh/vendor-completions
/nix/store/jg5k4ksj3silfqyw0id9wd99rakcz0ws-zsh-5.9/share/zsh/5.9/functions |
I know the reason. It comes from $ cat /nix/store/s0ii95lj2kc67gphakd3vll887kmcknv-set-environment|rg NIX_PROFILES
79:export NIX_PROFILES="/run/current-system/sw /nix/var/nix/profiles/default /etc/profiles/per-user/$USER $HOME/.nix-profile" However, $ head -n1 /nix/store/s0ii95lj2kc67gphakd3vll887kmcknv-set-environment
# DO NOT EDIT -- this file has been generated automatically. So I'll find another solution to fix this bug. |
I have reported this bug NixOS/nixpkgs#243826 |
Written here, @svanderburg said that Nix try to comply as close as possible with standard (well, with FHS). Whilst, it is failed to fully comply with FHS, why we don't try to comply with XDG Base Directory Spec, which more make sense to users?
Nix programs create three directories at my
$HOME
. Honestly, it looks very bad for me (by far no complaints on the Internet sadly).I wanted to create a patch for this if granted.
Best,
Abdillah
The text was updated successfully, but these errors were encountered: