diff --git a/hosts/orion/modules/nix.nix b/hosts/orion/modules/nix.nix index 98849775..83704218 100644 --- a/hosts/orion/modules/nix.nix +++ b/hosts/orion/modules/nix.nix @@ -11,6 +11,7 @@ "flakes" ]; auto-optimise-store = true; + use-xdg-base-directories = true; trusted-users = [ "@wheel" ]; }; gc = { diff --git a/users/price/conf/nix/default.nix b/users/price/conf/nix/default.nix index d664c8a9..59d246ec 100644 --- a/users/price/conf/nix/default.nix +++ b/users/price/conf/nix/default.nix @@ -1,8 +1,18 @@ -{ ... }: +{ pkgs, ... }: { nix = { + package = pkgs.nix; gc = { automatic = true; }; + settings = { + experimental-features = [ + "nix-command" + "flakes" + ]; + auto-optimise-store = true; + use-xdg-base-directories = true; + trusted-users = [ "@wheel" ]; + }; }; } diff --git a/users/price/dots/.config/nix/nix.conf b/users/price/dots/.config/nix/nix.conf deleted file mode 100644 index 094a1a61..00000000 --- a/users/price/dots/.config/nix/nix.conf +++ /dev/null @@ -1,4 +0,0 @@ -extra-experimental-features = flakes nix-command -max-jobs = auto -substituters = https://cache.nixos.org https://cache.nixos.org/ https://nix-community.cachix.org -trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= diff --git a/users/price/home.nix b/users/price/home.nix index 5274a4f8..e8c1574e 100644 --- a/users/price/home.nix +++ b/users/price/home.nix @@ -154,14 +154,20 @@ in CARGO_HOME = "${config.xdg.dataHome}/cargo"; OMNISHARPHOME = "${config.xdg.configHome}/omnisharp"; NPM_CONFIG_USERCONFIG = "${config.xdg.configHome}/npm/npmrc"; - TERMINFO_DIRS = "${config.home.homeDirectory}/.nix-profile/share/terminfo"; + TERMINFO_DIRS = "${config.home.profileDirectory}/share/terminfo"; WSLENV = "TERMINFO_DIRS"; LD_LIBRARY_PATH = lib.strings.makeLibraryPath [ - "${config.home.homeDirectory}/.nix-profile/" + "${config.home.profileDirectory}" "${pkgs.sqlite.out}" ]; - PKG_CONFIG_PATH = "${config.home.homeDirectory}/.nix-profile/lib/pkgconfig"; + PKG_CONFIG_PATH = "${config.home.profileDirectory}/lib/pkgconfig"; GTK_PATH = "${pkgs.gtk-engine-murrine}/lib/gtk-2.0"; + ANDROID_USER_HOME = "${config.xdg.dataHome}/android"; + ANSIBLE_HOME = "${config.xdg.dataHome}/ansible"; + CUDA_CACHE_PATH = "${config.xdg.cacheHome}/nv"; + DOCKER_CONFIG = "${config.xdg.configHome}/docker"; + GRADLE_USER_HOME = "${config.xdg.dataHome}/gradle"; + _JAVA_OPTIONS = "-Djava.util.prefs.userRoot='${config.xdg.configHome}/java'"; }; sessionPath = [ "${config.xdg.dataHome}/bin" ]; }; @@ -169,7 +175,7 @@ in xdg = { enable = true; mime.enable = true; - systemDirs.data = [ "${config.home.homeDirectory}/.nix-profile/share/" ]; + systemDirs.data = [ "${config.home.profileDirectory}/share/" ]; mimeApps = { enable = true; associations.added = {