+5
home-manager/fish.nix
+5
home-manager/fish.nix
+20
-9
home-manager/xdg.nix
+20
-9
home-manager/xdg.nix
···
1
{
2
flake.modules.homeManager.core =
3
{ config, pkgs, ... }:
4
let
5
inherit (config.xdg) dataHome stateHome;
6
in
7
{
8
xdg.userDirs = {
9
enable = pkgs.stdenv.hostPlatform.isLinux;
10
-
desktop = "${config.home.homeDirectory}/desktop";
11
-
documents = "${config.home.homeDirectory}/documents";
12
-
download = "${config.home.homeDirectory}/downloads";
13
-
music = "${config.home.homeDirectory}/music";
14
-
pictures = "${config.home.homeDirectory}/pictures";
15
-
publicShare = "${config.home.homeDirectory}/public";
16
-
templates = "${config.home.homeDirectory}/templates";
17
-
videos = "${config.home.homeDirectory}/videos";
18
};
19
20
home.preferXdgDirectories = true;
21
home.sessionVariables = {
22
CARGO_HOME = "${dataHome}/cargo";
23
-
CARGO_INSTALL_ROOT = "${config.home.homeDirectory}/.local";
24
HISTFILE = "${stateHome}/bash/history";
25
LESSHISTFILE = "${stateHome}/less/history";
26
};
···
1
{
2
+
flake.modules.nixos.core =
3
+
{ config, ... }:
4
+
{
5
+
environment.sessionVariables = {
6
+
XDG_CONFIG_HOME = "$HOME/.local/config";
7
+
XDG_CACHE_HOME = "$HOME/.local/cache";
8
+
};
9
+
};
10
flake.modules.homeManager.core =
11
{ config, pkgs, ... }:
12
let
13
+
inherit (config.home) homeDirectory;
14
inherit (config.xdg) dataHome stateHome;
15
in
16
{
17
+
xdg.configHome = "${homeDirectory}/.local/config";
18
+
xdg.cacheHome = "${homeDirectory}/.local/cache";
19
xdg.userDirs = {
20
enable = pkgs.stdenv.hostPlatform.isLinux;
21
+
desktop = "${homeDirectory}/desktop";
22
+
documents = "${homeDirectory}/documents";
23
+
download = "${homeDirectory}/downloads";
24
+
music = "${homeDirectory}/music";
25
+
pictures = "${homeDirectory}/pictures";
26
+
publicShare = "${homeDirectory}/public";
27
+
templates = "${homeDirectory}/templates";
28
+
videos = "${homeDirectory}/videos";
29
};
30
31
home.preferXdgDirectories = true;
32
home.sessionVariables = {
33
CARGO_HOME = "${dataHome}/cargo";
34
+
CARGO_INSTALL_ROOT = "${homeDirectory}/.local";
35
HISTFILE = "${stateHome}/bash/history";
36
LESSHISTFILE = "${stateHome}/less/history";
37
};