From dfb57c2e3469a0a8c0da2770f19709cc3b550c6d Mon Sep 17 00:00:00 2001 From: Bernardo Magri Date: Sat, 20 Jun 2026 18:23:21 +0100 Subject: [PATCH] feat(home): create XDG user directories by default Enable xdg.userDirs with createDirectories so a fresh install lands with Downloads/Documents/Pictures/Music/Videos/Desktop/Public/Templates (plus home-manager's Projects) present and written to user-dirs.dirs, rather than appearing only on first app use. mkDefault so a downstream home.nix can flip it off or remap individual paths. Co-Authored-By: Claude Opus 4.8 --- modules/home/default.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/modules/home/default.nix b/modules/home/default.nix index 6e08691..76a7009 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -1,7 +1,7 @@ # Nomarchy — Home Manager entry point. # Consume this via homeModules.nomarchy (flake.nix), which also pulls in # the stylix home module that stylix.nix configures. -{ config, pkgs, ... }: +{ config, lib, pkgs, ... }: { imports = [ @@ -33,6 +33,16 @@ services.network-manager-applet.enable = true; xsession.preferStatusNotifierItems = true; + # Standard XDG user directories (Downloads, Documents, Pictures, Music, + # Videos, Desktop, Public, Templates): written to user-dirs.dirs so file + # pickers/browsers resolve them, and created on activation so a fresh + # install lands with them present (not just on first app use). mkDefault + # so a downstream home.nix can flip it off or remap individual paths. + xdg.userDirs = { + enable = lib.mkDefault true; + createDirectories = lib.mkDefault true; + }; + home.stateVersion = "26.05"; home.packages = with pkgs; [