move xdg-dirs config to home level

This commit is contained in:
ulic-youthlic 2025-02-01 23:09:24 +08:00
parent 4c7e6e3af3
commit 69e684bd7e
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721
6 changed files with 65 additions and 70 deletions

25
home/modules/xdg-dirs.nix Normal file
View file

@ -0,0 +1,25 @@
{ lib, config, ... }:
let
cfg = config.youthlic.xdg-dirs;
in
{
options = {
youthlic.xdg-dirs = {
enable = lib.mkEnableOption "xdg-dirs";
};
};
config = lib.mkIf cfg.enable {
xdg.userDirs = {
enable = true;
download = "${config.home.homeDirectory}/dls";
documents = "${config.home.homeDirectory}/doc";
music = "${config.home.homeDirectory}/mus";
pictures = "${config.home.homeDirectory}/pic";
videos = "${config.home.homeDirectory}/vid";
templates = "${config.home.homeDirectory}/tpl";
publicShare = "${config.home.homeDirectory}/pub";
desktop = "${config.home.homeDirectory}/dsk";
createDirectories = true;
};
};
}