xdg-ninja
This commit is contained in:
parent
723691a46a
commit
993bb11a26
4 changed files with 55 additions and 6 deletions
|
@ -142,14 +142,9 @@
|
|||
|
||||
environment = {
|
||||
sessionVariables = {
|
||||
GOPATH = "\$HOME/.local/share/go";
|
||||
|
||||
MOZ_ENABLE_WAYLAND = "1";
|
||||
MOZ_DRM_DEVICE = "/dev/dri/card0";
|
||||
|
||||
HISTFILE = "\${XDG_STATE_HOME}/bash/history";
|
||||
CARGO_HOME = "\${XDG_DATA_HOME}/cargo";
|
||||
|
||||
CHROME_EXECUTABLE = "${pkgs.ungoogled-chromium}/bin/chromium";
|
||||
|
||||
#NIXOS_OZONE_WL = "1";
|
||||
|
|
|
@ -202,6 +202,7 @@
|
|||
httpie
|
||||
mangohud
|
||||
nix-index
|
||||
xdg-ninja
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -53,7 +53,6 @@ in {
|
|||
gs = "g stash";
|
||||
n = "nix";
|
||||
woman = "man";
|
||||
wget = "wget --hsts-file=\"${config.home-manager.users.${config'.username}.xdg.dataHome}/wget-hsts\"";
|
||||
open = "xdg-open";
|
||||
":q" = "exit";
|
||||
} // cfg.extraAliases;
|
||||
|
|
|
@ -13,7 +13,61 @@
|
|||
image_viewer = "imv.desktop";
|
||||
text_editor = "nvim.desktop";
|
||||
in {
|
||||
|
||||
environment.sessionVariables = {
|
||||
ANDROID_HOME = "${hmCfg.xdg.dataHome}/android";
|
||||
CARGO_HOME = "${hmCfg.xdg.dataHome}/cargo";
|
||||
DOTNET_CLI_HOME = "${hmCfg.xdg.dataHome}/dotnet";
|
||||
GOPATH = "${hmCfg.xdg.dataHome}/go";
|
||||
GNUPGHOME = "${hmCfg.xdg.dataHome}/gnupg";
|
||||
GRADLE_USER_HOME = "${hmCfg.xdg.dataHome}/gradle";
|
||||
HISTFILE = "${hmCfg.xdg.stateHome}/bash/history";
|
||||
MYSQL_HISTFILE = "${hmCfg.xdg.stateHome}/mysql/history";
|
||||
NPM_CONFIG_USERCONFIG = "${hmCfg.xdg.configHome}/npm/npmrc";
|
||||
NUGET_PACKAGES = "${hmCfg.xdg.cacheHome}/NuGetPackages";
|
||||
_JAVA_OPTIONS = "-Djava.util.prefs.userRoot=${hmCfg.xdg.configHome}/java";
|
||||
PARALLEL_HOME = "${hmCfg.xdg.configHome}/parallel";
|
||||
PYTHONSTARTUP = "${hmCfg.xdg.configHome}/python/pythonrc";
|
||||
RUSTUP_HOME = "${hmCfg.xdg.dataHome}/rustup";
|
||||
WINEPREFIX = "${hmCfg.xdg.dataHome}/wine";
|
||||
XAUTHORITY = "\$XDG_RUNTIME_DIR/Xauthority";
|
||||
};
|
||||
|
||||
myOptions.programs.zsh.extraAliases = {
|
||||
gdb = "gdb -n -x ${hmCfg.xdg.configHome}/gdb/init";
|
||||
pidgin = "pidgin --config=${hmCfg.xdg.dataHome}/purple";
|
||||
svn = "svn --config-dir ${hmCfg.xdg.configHome}/subversion";
|
||||
wget = "wget --hsts-file=\"${hmCfg.xdg.dataHome}/wget-hsts\"";
|
||||
};
|
||||
|
||||
home-manager.users.${config'.username} = {
|
||||
xdg.configFile."npm/npmrc".text = ''
|
||||
prefix=${hmCfg.xdg.dataHome}/npm
|
||||
cache=${hmCfg.xdg.cacheHome}/npm
|
||||
tmp=\$XDG_RUNTIME_DIR/npm
|
||||
init-module=${hmCfg.xdg.configHome}/npm/config/npm-init.js
|
||||
'';
|
||||
|
||||
xdg.configFile."python/pythonrc".text = ''
|
||||
import os
|
||||
import atexit
|
||||
import readline
|
||||
|
||||
history = os.path.join(os.environ['XDG_CACHE_HOME'], 'python_history')
|
||||
try:
|
||||
readline.read_history_file(history)
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
def write_history():
|
||||
try:
|
||||
readline.write_history_file(history)
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
atexit.register(write_history)
|
||||
'';
|
||||
|
||||
xdg = {
|
||||
cacheHome = "${hmCfg.home.homeDirectory}/.cache";
|
||||
configHome = "${hmCfg.home.homeDirectory}/.config";
|
||||
|
|
Loading…
Reference in a new issue