Files
dotfiles/modules/desktop/userdirs.nix
alexion ab89ba8391 feat(desktop): resolve media output paths through XDG user-dirs
Add a modules.desktop.userdirs module that declares the XDG user directories,
and route the recorder and screenshot tools through xdg-user-dir so their
output folders (Videos/Recordings, Pictures/Screenshots) follow one relocatable
source instead of a hardcoded $HOME path.
2026-07-22 23:11:16 -04:00

17 lines
526 B
Nix

{ config, lib, ... }:
# Declares the XDG user directories, so a tool that queries them lands in a
# well-known folder a host can relocate from one place.
let
cfg = config.modules.desktop.userdirs;
user = config.user.name;
in
{
options.modules.desktop.userdirs.enable = lib.mkEnableOption "XDG user directories";
config = lib.mkIf cfg.enable {
# enable writes ~/.config/user-dirs.dirs from the option defaults, which
# xdg-user-dir then reads.
home-manager.users.${user}.xdg.userDirs.enable = true;
};
}