diff --git a/modules/misc/xdg-user-dirs.nix b/modules/misc/xdg-user-dirs.nix index 9d29729a5..36f200eb9 100644 --- a/modules/misc/xdg-user-dirs.nix +++ b/modules/misc/xdg-user-dirs.nix @@ -34,49 +34,65 @@ in { desktop = mkOption { type = with types; coercedTo path toString str; - default = "$HOME/Desktop"; + default = "${config.home.homeDirectory}/Desktop"; + defaultText = + literalExpression ''"''${config.home.homeDirectory}/Desktop"''; description = "The Desktop directory."; }; documents = mkOption { type = with types; coercedTo path toString str; - default = "$HOME/Documents"; + default = "${config.home.homeDirectory}/Documents"; + defaultText = + literalExpression ''"''${config.home.homeDirectory}/Documents"''; description = "The Documents directory."; }; download = mkOption { type = with types; coercedTo path toString str; - default = "$HOME/Downloads"; + default = "${config.home.homeDirectory}/Downloads"; + defaultText = + literalExpression ''"''${config.home.homeDirectory}/Downloads"''; description = "The Downloads directory."; }; music = mkOption { type = with types; coercedTo path toString str; - default = "$HOME/Music"; + default = "${config.home.homeDirectory}/Music"; + defaultText = + literalExpression ''"''${config.home.homeDirectory}/Music"''; description = "The Music directory."; }; pictures = mkOption { type = with types; coercedTo path toString str; - default = "$HOME/Pictures"; + default = "${config.home.homeDirectory}/Pictures"; + defaultText = + literalExpression ''"''${config.home.homeDirectory}/Pictures"''; description = "The Pictures directory."; }; publicShare = mkOption { type = with types; coercedTo path toString str; - default = "$HOME/Public"; + default = "${config.home.homeDirectory}/Public"; + defaultText = + literalExpression ''"''${config.home.homeDirectory}/Public"''; description = "The Public share directory."; }; templates = mkOption { type = with types; coercedTo path toString str; - default = "$HOME/Templates"; + default = "${config.home.homeDirectory}/Templates"; + defaultText = + literalExpression ''"''${config.home.homeDirectory}/Templates"''; description = "The Templates directory."; }; videos = mkOption { type = with types; coercedTo path toString str; - default = "$HOME/Videos"; + default = "${config.home.homeDirectory}/Videos"; + defaultText = + literalExpression ''"''${config.home.homeDirectory}/Videos"''; description = "The Videos directory."; }; @@ -86,7 +102,7 @@ in { defaultText = literalExpression "{ }"; example = literalExpression '' { - XDG_MISC_DIR = "$HOME/Misc"; + XDG_MISC_DIR = "''${config.home.homeDirectory}/Misc"; } ''; description = "Other user directories.";