mirror of
https://github.com/nix-community/home-manager
synced 2024-11-27 05:29:46 +01:00
treewide: prefer XDG variables over dot directories
Currently, dot directories and XDG base directories are used inconsistently in the Home Manager option declarations. This creates ambiguity for the user as to where the location of the file should be albeit this is rarely encountered in practice as it is sufficient to read upstream documentation. The rationale is to make declarations consistent and make a clear distinction between hardcoded and modular specifications. References to ~/.config in relevant nixpkgs modules were untouched as the location is hardcoded upstream[1]. Furthermore, modules of programs which do not follow XDG specifications were also untouched. Generalization of tilde(~) expansions to $HOME were also considered, however there isn't sufficient rationale despite the use of $HOME being more universal. The expansion is standardized in POSIX[2] and is essentially portable across all shells, thus there is no pragmatic value to introducing the change. [1] https://github.com/nixos/nixpkgs/blob/master/pkgs/top-level/impure.nix [2] https://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_06_01
This commit is contained in:
parent
829e89a16f
commit
c7592b747b
22 changed files with 30 additions and 30 deletions
|
@ -414,7 +414,7 @@
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Indicates the path to the Home Manager configuration file. If not given,
|
Indicates the path to the Home Manager configuration file. If not given,
|
||||||
<filename>~/.config/nixpkgs/home.nix</filename> is used.
|
<filename>$XDG_CONFIG_HOME/nixpkgs/home.nix</filename> is used.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
@ -589,7 +589,7 @@
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>
|
<term>
|
||||||
<filename>~/.local/share/home-manager/news-read-ids</filename>
|
<filename>$XDG_DATA_HOME/home-manager/news-read-ids</filename>
|
||||||
</term>
|
</term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
|
|
|
@ -123,7 +123,7 @@ in {
|
||||||
};
|
};
|
||||||
description = ''
|
description = ''
|
||||||
Extra configuration options to add to
|
Extra configuration options to add to
|
||||||
<filename>~/.config/gtk-3.0/settings.ini</filename>.
|
<filename>$XDG_CONFIG_HOME/gtk-3.0/settings.ini</filename>.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -132,7 +132,7 @@ in {
|
||||||
default = "";
|
default = "";
|
||||||
description = ''
|
description = ''
|
||||||
Extra configuration lines to add verbatim to
|
Extra configuration lines to add verbatim to
|
||||||
<filename>~/.config/gtk-3.0/gtk.css</filename>.
|
<filename>$XDG_CONFIG_HOME/gtk-3.0/gtk.css</filename>.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -37,7 +37,7 @@ in {
|
||||||
'';
|
'';
|
||||||
description = ''
|
description = ''
|
||||||
Configuration written to
|
Configuration written to
|
||||||
<filename>~/.config/alacritty/alacritty.yml</filename>. See
|
<filename>$XDG_CONFIG_HOME/alacritty/alacritty.yml</filename>. See
|
||||||
<link xlink:href="https://github.com/jwilm/alacritty/blob/master/alacritty.yml"/>
|
<link xlink:href="https://github.com/jwilm/alacritty/blob/master/alacritty.yml"/>
|
||||||
for the default configuration.
|
for the default configuration.
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -60,7 +60,7 @@ in {
|
||||||
'';
|
'';
|
||||||
description = ''
|
description = ''
|
||||||
Configuration written to
|
Configuration written to
|
||||||
<filename>~/.config/atuin/config.toml</filename>.
|
<filename>$XDG_CONFIG_HOME/atuin/config.toml</filename>.
|
||||||
</para><para>
|
</para><para>
|
||||||
See <link xlink:href="https://github.com/ellie/atuin/blob/main/docs/config.md" /> for the full list
|
See <link xlink:href="https://github.com/ellie/atuin/blob/main/docs/config.md" /> for the full list
|
||||||
of options.
|
of options.
|
||||||
|
|
|
@ -45,7 +45,7 @@ in {
|
||||||
default = { };
|
default = { };
|
||||||
description = ''
|
description = ''
|
||||||
Configuration written to
|
Configuration written to
|
||||||
<filename>~/.config/beets/config.yaml</filename>
|
<filename>$XDG_CONFIG_HOME/beets/config.yaml</filename>
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -29,7 +29,7 @@ in {
|
||||||
default = { };
|
default = { };
|
||||||
description = ''
|
description = ''
|
||||||
Configuration written to
|
Configuration written to
|
||||||
<filename>~/.config/direnv/config.toml</filename>.
|
<filename>$XDG_CONFIG_HOME/direnv/config.toml</filename>.
|
||||||
</para><para>
|
</para><para>
|
||||||
See
|
See
|
||||||
<citerefentry>
|
<citerefentry>
|
||||||
|
@ -45,7 +45,7 @@ in {
|
||||||
default = "";
|
default = "";
|
||||||
description = ''
|
description = ''
|
||||||
Custom stdlib written to
|
Custom stdlib written to
|
||||||
<filename>~/.config/direnv/direnvrc</filename>.
|
<filename>$XDG_CONFIG_HOME/direnv/direnvrc</filename>.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -270,7 +270,7 @@ in {
|
||||||
};
|
};
|
||||||
}'';
|
}'';
|
||||||
description = ''
|
description = ''
|
||||||
Configures <filename>~/.config/hexchat/servlist.conf</filename>.
|
Configures <filename>$XDG_CONFIG_HOME/hexchat/servlist.conf</filename>.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -286,7 +286,7 @@ in {
|
||||||
};
|
};
|
||||||
'';
|
'';
|
||||||
description = ''
|
description = ''
|
||||||
Configuration for <filename>~/.config/hexchat/hexchat.conf</filename>, see
|
Configuration for <filename>$XDG_CONFIG_HOME/hexchat/hexchat.conf</filename>, see
|
||||||
<link xlink:href="https://hexchat.readthedocs.io/en/latest/settings.html#list-of-settings"/>
|
<link xlink:href="https://hexchat.readthedocs.io/en/latest/settings.html#list-of-settings"/>
|
||||||
for supported values.
|
for supported values.
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -133,7 +133,7 @@ in {
|
||||||
'';
|
'';
|
||||||
description = ''
|
description = ''
|
||||||
Configuration options to add to
|
Configuration options to add to
|
||||||
<filename>~/.config/htop/htoprc</filename>.
|
<filename>$XDG_CONFIG_HOME/htop/htoprc</filename>.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -635,7 +635,7 @@ in {
|
||||||
default = "";
|
default = "";
|
||||||
description = ''
|
description = ''
|
||||||
Extra configuration lines to add to
|
Extra configuration lines to add to
|
||||||
<filename>~/.config/kak/kakrc</filename>.
|
<filename>$XDG_CONFIG_HOME/kak/kakrc</filename>.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@ in {
|
||||||
'';
|
'';
|
||||||
description = ''
|
description = ''
|
||||||
Configuration written to
|
Configuration written to
|
||||||
<filename>~/.config/kitty/kitty.conf</filename>. See
|
<filename>$XDG_CONFIG_HOME/kitty/kitty.conf</filename>. See
|
||||||
<link xlink:href="https://sw.kovidgoyal.net/kitty/conf.html" />
|
<link xlink:href="https://sw.kovidgoyal.net/kitty/conf.html" />
|
||||||
for the documentation.
|
for the documentation.
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -32,7 +32,7 @@ in {
|
||||||
'';
|
'';
|
||||||
description = ''
|
description = ''
|
||||||
Configuration written to
|
Configuration written to
|
||||||
<filename>~/.config/lazygit/config.yml</filename> on Linux
|
<filename>$XDG_CONFIG_HOME/lazygit/config.yml</filename> on Linux
|
||||||
or <filename>~/Library/Application Support/lazygit/config.yml</filename> on Darwin. See
|
or <filename>~/Library/Application Support/lazygit/config.yml</filename> on Darwin. See
|
||||||
<link xlink:href="https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md"/>
|
<link xlink:href="https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md"/>
|
||||||
for supported values.
|
for supported values.
|
||||||
|
|
|
@ -39,7 +39,7 @@ in {
|
||||||
};
|
};
|
||||||
description = ''
|
description = ''
|
||||||
Configuration written to
|
Configuration written to
|
||||||
<filename>~/.config/lsd/config.yaml</filename>. See
|
<filename>$XDG_CONFIG_HOME/lsd/config.yaml</filename>. See
|
||||||
<link xlink:href="https://github.com/Peltoche/lsd#config-file-content"/>
|
<link xlink:href="https://github.com/Peltoche/lsd#config-file-content"/>
|
||||||
for supported values.
|
for supported values.
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -55,7 +55,7 @@ in {
|
||||||
'';
|
'';
|
||||||
description = ''
|
description = ''
|
||||||
Configuration written to
|
Configuration written to
|
||||||
<filename>~/.config/MangoHud/MangoHud.conf</filename>. See
|
<filename>$XDG_CONFIG_HOME/MangoHud/MangoHud.conf</filename>. See
|
||||||
<link xlink:href="https://github.com/flightlessmango/MangoHud/blob/master/bin/MangoHud.conf"/>
|
<link xlink:href="https://github.com/flightlessmango/MangoHud/blob/master/bin/MangoHud.conf"/>
|
||||||
for the default configuration.
|
for the default configuration.
|
||||||
'';
|
'';
|
||||||
|
@ -74,7 +74,7 @@ in {
|
||||||
description = ''
|
description = ''
|
||||||
Sets MangoHud settings per application.
|
Sets MangoHud settings per application.
|
||||||
Configuration written to
|
Configuration written to
|
||||||
<filename>~/.config/MangoHud/{application_name}.conf</filename>. See
|
<filename>$XDG_CONFIG_HOME/MangoHud/{application_name}.conf</filename>. See
|
||||||
<link xlink:href="https://github.com/flightlessmango/MangoHud/blob/master/bin/MangoHud.conf"/>
|
<link xlink:href="https://github.com/flightlessmango/MangoHud/blob/master/bin/MangoHud.conf"/>
|
||||||
for the default configuration.
|
for the default configuration.
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -90,7 +90,7 @@ in {
|
||||||
config = mkOption {
|
config = mkOption {
|
||||||
description = ''
|
description = ''
|
||||||
Configuration written to
|
Configuration written to
|
||||||
<filename>~/.config/mpv/mpv.conf</filename>. See
|
<filename>$XDG_CONFIG_HOME/mpv/mpv.conf</filename>. See
|
||||||
<citerefentry>
|
<citerefentry>
|
||||||
<refentrytitle>mpv</refentrytitle>
|
<refentrytitle>mpv</refentrytitle>
|
||||||
<manvolnum>1</manvolnum>
|
<manvolnum>1</manvolnum>
|
||||||
|
@ -112,7 +112,7 @@ in {
|
||||||
profiles = mkOption {
|
profiles = mkOption {
|
||||||
description = ''
|
description = ''
|
||||||
Sub-configuration options for specific profiles written to
|
Sub-configuration options for specific profiles written to
|
||||||
<filename>~/.config/mpv/mpv.conf</filename>. See
|
<filename>$XDG_CONFIG_HOME/mpv/mpv.conf</filename>. See
|
||||||
<option>programs.mpv.config</option> for more information.
|
<option>programs.mpv.config</option> for more information.
|
||||||
'';
|
'';
|
||||||
type = mpvProfiles;
|
type = mpvProfiles;
|
||||||
|
@ -143,7 +143,7 @@ in {
|
||||||
bindings = mkOption {
|
bindings = mkOption {
|
||||||
description = ''
|
description = ''
|
||||||
Input configuration written to
|
Input configuration written to
|
||||||
<filename>~/.config/mpv/input.conf</filename>. See
|
<filename>$XDG_CONFIG_HOME/mpv/input.conf</filename>. See
|
||||||
<citerefentry>
|
<citerefentry>
|
||||||
<refentrytitle>mpv</refentrytitle>
|
<refentrytitle>mpv</refentrytitle>
|
||||||
<manvolnum>1</manvolnum>
|
<manvolnum>1</manvolnum>
|
||||||
|
|
|
@ -32,7 +32,7 @@ in {
|
||||||
'';
|
'';
|
||||||
description = ''
|
description = ''
|
||||||
Configuration written to
|
Configuration written to
|
||||||
<filename>~/.config/ncspot/config.toml</filename>.
|
<filename>$XDG_CONFIG_HOME/ncspot/config.toml</filename>.
|
||||||
</para><para>
|
</para><para>
|
||||||
See <link xlink:href="https://github.com/hrkfdn/ncspot#configuration" />
|
See <link xlink:href="https://github.com/hrkfdn/ncspot#configuration" />
|
||||||
for the full list of options.
|
for the full list of options.
|
||||||
|
|
|
@ -17,7 +17,7 @@ in {
|
||||||
default = { };
|
default = { };
|
||||||
description = ''
|
description = ''
|
||||||
Configuration written to
|
Configuration written to
|
||||||
<filename>~/.config/noti/noti.yaml</filename>.
|
<filename>$XDG_CONFIG_HOME/noti/noti.yaml</filename>.
|
||||||
</para><para>
|
</para><para>
|
||||||
See
|
See
|
||||||
<citerefentry>
|
<citerefentry>
|
||||||
|
|
|
@ -42,7 +42,7 @@ in {
|
||||||
'';
|
'';
|
||||||
description = ''
|
description = ''
|
||||||
Configuration written to
|
Configuration written to
|
||||||
<filename>~/.config/nushell/config.toml</filename>.
|
<filename>$XDG_CONFIG_HOME/nushell/config.toml</filename>.
|
||||||
</para><para>
|
</para><para>
|
||||||
See <link xlink:href="https://www.nushell.sh/book/configuration.html" /> for the full list
|
See <link xlink:href="https://www.nushell.sh/book/configuration.html" /> for the full list
|
||||||
of options.
|
of options.
|
||||||
|
|
|
@ -17,7 +17,7 @@ in {
|
||||||
default = "";
|
default = "";
|
||||||
description = ''
|
description = ''
|
||||||
Configuration written to
|
Configuration written to
|
||||||
<filename>~/.config/rtorrent/rtorrent.rc</filename>. See
|
<filename>$XDG_CONFIG_HOME/rtorrent/rtorrent.rc</filename>. See
|
||||||
<link xlink:href="https://github.com/rakshasa/rtorrent/wiki/Config-Guide" />
|
<link xlink:href="https://github.com/rakshasa/rtorrent/wiki/Config-Guide" />
|
||||||
for explanation about possible values.
|
for explanation about possible values.
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -80,7 +80,7 @@ in {
|
||||||
nullOr (attrsOf (either str (either int (either bool (listOf str)))));
|
nullOr (attrsOf (either str (either int (either bool (listOf str)))));
|
||||||
default = null;
|
default = null;
|
||||||
description =
|
description =
|
||||||
"Settings for sm64ex's <filename>~/.local/share/sm64pc/sm64config.txt</filename> file.";
|
"Settings for sm64ex's <filename>$XDG_DATA_HOME/sm64pc/sm64config.txt</filename> file.";
|
||||||
example = literalExpression ''
|
example = literalExpression ''
|
||||||
{
|
{
|
||||||
fullscreen = false;
|
fullscreen = false;
|
||||||
|
|
|
@ -51,7 +51,7 @@ in {
|
||||||
'';
|
'';
|
||||||
description = ''
|
description = ''
|
||||||
Configuration written to
|
Configuration written to
|
||||||
<filename>~/.config/starship.toml</filename>.
|
<filename>$XDG_CONFIG_HOME/starship.toml</filename>.
|
||||||
</para><para>
|
</para><para>
|
||||||
See <link xlink:href="https://starship.rs/config/" /> for the full list
|
See <link xlink:href="https://starship.rs/config/" /> for the full list
|
||||||
of options.
|
of options.
|
||||||
|
|
|
@ -42,7 +42,7 @@ in {
|
||||||
'';
|
'';
|
||||||
description = ''
|
description = ''
|
||||||
Configuration written to
|
Configuration written to
|
||||||
<filename>~/.config/topgrade.toml</filename>.
|
<filename>$XDG_CONFIG_HOME/topgrade.toml</filename>.
|
||||||
</para><para>
|
</para><para>
|
||||||
See <link xlink:href="https://github.com/r-darwish/topgrade/wiki/Step-list" /> for the full list
|
See <link xlink:href="https://github.com/r-darwish/topgrade/wiki/Step-list" /> for the full list
|
||||||
of options.
|
of options.
|
||||||
|
|
|
@ -24,7 +24,7 @@ in {
|
||||||
Commands to be run after an output configuration was
|
Commands to be run after an output configuration was
|
||||||
changed. The Nix value declared here will be translated to
|
changed. The Nix value declared here will be translated to
|
||||||
JSON and written to the <option>execute_after</option> key
|
JSON and written to the <option>execute_after</option> key
|
||||||
in <filename>~/.config/grobi.conf</filename>.
|
in <filename>$XDG_CONFIG_HOME/grobi.conf</filename>.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ in {
|
||||||
<link xlink:href="https://github.com/fd0/grobi/blob/master/doc/grobi.conf"/>
|
<link xlink:href="https://github.com/fd0/grobi/blob/master/doc/grobi.conf"/>
|
||||||
for more information. The Nix value declared here will be
|
for more information. The Nix value declared here will be
|
||||||
translated to JSON and written to the <option>rules</option>
|
translated to JSON and written to the <option>rules</option>
|
||||||
key in <filename>~/.config/grobi.conf</filename>.
|
key in <filename>$XDG_CONFIG_HOME/grobi.conf</filename>.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue