home(xdg): add persistence and configure paths

This commit is contained in:
514fpv 2024-01-02 14:53:03 +08:00
parent 517c2d717f
commit cc58d8c7a2
Signed by: koishi
SSH key fingerprint: SHA256:VkIdW3jUIiqecV2WNAje2fGU5lEhN0XZ58DN0NS4pv0
2 changed files with 24 additions and 0 deletions

21
home/xdg/home.nix Normal file
View file

@ -0,0 +1,21 @@
{ config
, ... }: {
xdg = {
enable = true;
userDirs = let
home = config.home.homeDirectory;
local = "${home}/local";
in {
enable = true;
createDirectories = true;
download = "${home}/dl";
desktop = "${local}/desktop";
documents = "${local}/documents";
music = "${local}/music";
pictures = "${local}/pictures";
publicShare = "${local}/public";
templates = "${local}/templates";
videos = "${local}/videos";
};
};
}

3
home/xdg/nixos.nix Normal file
View file

@ -0,0 +1,3 @@
{
users.home.persist.directories = [ "local" "dl" ];
}