File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change 110110 } ;
111111
112112 createDirectories = lib . mkEnableOption "automatic creation of the XDG user directories" ;
113+
114+ setSessionVariables = mkOption {
115+ type = with types ; bool ;
116+ default = lib . versionOlder config . home . stateVersion "25.11" ;
117+ defaultText = literalExpression ''
118+ lib.versionOlder config.home.stateVersion "25.11"
119+ '' ;
120+ description = ''
121+ Whether to set the XDG user dir environment variables, like
122+ `XDG_DESKTOP_DIR`. The recommended way to get these values is via the
123+ `xdg-user-dir` command or by processing
124+ `$XDG_CONFIG_HOME/user-dirs.dirs` directly in your application.
125+
126+ This defaults to `true` for state version < 25.11 and `false` otherwise.
127+ '' ;
128+ } ;
113129 } ;
114130
115131 config =
139155
140156 home . packages = lib . mkIf ( cfg . package != null ) [ cfg . package ] ;
141157
142- home . sessionVariables = directories ;
158+ home . sessionVariables = lib . mkIf cfg . setSessionVariables directories ;
143159
144160 home . activation . createXdgUserDirectories = lib . mkIf cfg . createDirectories (
145161 let
You can’t perform that action at this time.
0 commit comments