-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
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
Provide a way to customize the xdg-user-dirs #33282
Comments
GNOME users, at least, already have |
The If |
This looks like a duplicate of #16200. The environment variable |
I'm also interested in a way to customize xdg-user-dirs |
There is little need for dedicated options, you can just use {
environment.etc."xdg/user-dirs.defaults".text = ''
DESKTOP=Desktop
DOCUMENTS=Documents
DOWNLOAD=Downloads
MUSIC=Music
PICTURES=Pictures
PUBLICSHARE=Public
TEMPLATES=Templates
VIDEOS=Videos
'';
} in your |
@jtojnar It does not work...
I am using Gnome as a DE and the following user-dirs structure:
|
|
I did reboot the VM after every |
Hmm, apparently, it should have been |
@jtojnar ... sorry for the delay...
And it does not use the user-dirs I configure above |
Okay, there are several issues here:
imports = [
({lib, pkgs, ...}: {
environment.systemPackages = lib.mkBefore [
(pkgs.writeTextFile {
name = "user-dirs.defaults";
text = ''
XDG_DESKTOP_DIR=system/desktop
XDG_DOWNLOAD_DIR=downloads
XDG_TEMPLATES_DIR=system/templates
XDG_PUBLICSHARE_DIR=system/public
XDG_DOCUMENTS_DIR=documents
XDG_MUSIC_DIR=media/music
XDG_PICTURES_DIR=media/photos
XDG_VIDEOS_DIR=media/video
'';
destination = "/etc/xdg/user-dirs.defaults";
})
];
})
]; But again, it does not work. Turns out we are prefixing the With the patch and the horrendous snippet, I can confirm the expected directories were created. We should try to find out how to make the environment variable contain |
Previously, we were only adding profile-relative paths to XDG_CONFIG_DIRS variable. That required very ugly hacks like NixOS#33282 (comment) to be able to configure XDG stuff. Now, we are prepending the variable with /etc/xdg, allowing us to simply use `environment.etc."xdg/…"` options.
#67389 now contains full fix enabling us to use |
Awesome @jtojnnar .... I just built from your branch https://github.com/jtojnar/nixpkgs/tree/xdg-user-dirs and works like a charm. The config I'm currently using after the developments in #67389 is...
|
@jtojnar @tiramiseb you probably want to reopen this, because functionality implemented here is currently broken. Please see: #221604 |
As mentioned in the other issue, there is a prerequisite of |
The xdg-user-dirs package contains a file named
etc/xdg/user-dirs.defaults
.A module allowing to customize this file would be great.
The text was updated successfully, but these errors were encountered: