home: create 'modules/home' folder
Consolidating all modules under the same path, to clear out the top-level directory.
This commit is contained in:
parent
c856933803
commit
65a8f7c481
119 changed files with 2 additions and 2 deletions
54
modules/home/xdg/default.nix
Normal file
54
modules/home/xdg/default.nix
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.my.home.xdg;
|
||||
in
|
||||
{
|
||||
options.my.home.xdg = with lib; {
|
||||
enable = my.mkDisableOption "XDG configuration";
|
||||
};
|
||||
|
||||
config.xdg = lib.mkIf cfg.enable {
|
||||
enable = true;
|
||||
# File types
|
||||
mime.enable = true;
|
||||
# File associatons
|
||||
mimeApps = {
|
||||
enable = true;
|
||||
};
|
||||
# User directories
|
||||
userDirs = {
|
||||
enable = true;
|
||||
# I want them lowercased
|
||||
desktop = "\$HOME/desktop";
|
||||
documents = "\$HOME/documents";
|
||||
download = "\$HOME/downloads";
|
||||
music = "\$HOME/music";
|
||||
pictures = "\$HOME/pictures";
|
||||
publicShare = "\$HOME/public";
|
||||
templates = "\$HOME/templates";
|
||||
videos = "\$HOME/videos";
|
||||
};
|
||||
# A tidy home is a tidy mind
|
||||
dataFile = {
|
||||
"bash/.keep".text = "";
|
||||
"gdb/.keep".text = "";
|
||||
"tig/.keep".text = "";
|
||||
};
|
||||
};
|
||||
|
||||
# I want a tidier home
|
||||
config.home.sessionVariables = with config.xdg; lib.mkIf cfg.enable {
|
||||
ANDROID_HOME = "${dataHome}/android";
|
||||
CARGO_HOME = "${dataHome}/cargo";
|
||||
DOCKER_CONFIG = "${configHome}/docker";
|
||||
GDBHISTFILE = "${dataHome}/gdb/gdb_history";
|
||||
HISTFILE = "${dataHome}/bash/history";
|
||||
INPUTRC = "${configHome}/readline/inputrc";
|
||||
LESSHISTFILE = "${dataHome}/less/history";
|
||||
LESSKEY = "${configHome}/less/lesskey";
|
||||
PSQL_HISTORY = "${dataHome}/psql_history";
|
||||
REPO_CONFIG_DIR = "${configHome}/repo";
|
||||
REDISCLI_HISTFILE = "${dataHome}/redis/rediscli_history";
|
||||
XCOMPOSECACHE = "${dataHome}/X11/xcompose";
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue