diff options
| author | Freya Murphy <freya@freyacat.org> | 2025-12-16 19:28:04 -0500 |
|---|---|---|
| committer | Freya Murphy <freya@freyacat.org> | 2025-12-16 20:01:33 -0500 |
| commit | ce31f8c51b57f29f1055ce92f92fa1bd835e6344 (patch) | |
| tree | 4e0d62682a53cbeef772c6d2bfe5b35134f2cda8 | |
| parent | update commits (diff) | |
| download | dotfiles-nix-ce31f8c51b57f29f1055ce92f92fa1bd835e6344.tar.gz dotfiles-nix-ce31f8c51b57f29f1055ce92f92fa1bd835e6344.tar.bz2 dotfiles-nix-ce31f8c51b57f29f1055ce92f92fa1bd835e6344.zip | |
remove many programs dotfiles from homedir
| -rw-r--r-- | home/default.nix | 139 | ||||
| -rw-r--r-- | home/gpg.nix | 1 | ||||
| -rw-r--r-- | home/gtk/default.nix | 1 | ||||
| -rw-r--r-- | home/tmux/default.nix | 2 | ||||
| -rw-r--r-- | home/zsh/default.nix | 1 | ||||
| -rw-r--r-- | home/zsh/zprofile | 3 | ||||
| -rw-r--r-- | home/zsh/zshrc | 4 | ||||
| -rw-r--r-- | nix.conf | 1 | ||||
| -rw-r--r-- | system/default.nix | 4 |
9 files changed, 102 insertions, 54 deletions
diff --git a/home/default.nix b/home/default.nix index e5c5114..0f5a1ac 100644 --- a/home/default.nix +++ b/home/default.nix @@ -64,65 +64,106 @@ in { # mirrored from system ++ config.extraPackages; - xdg.configFile = { - "aacs/keydb.cfg" = { - source = ../files/keys/bluray.cfg; + xdg = { + enable = true; + cacheHome = "${config.homePath}/.cache"; + dataHome = "${config.homePath}/.local/share"; + stateHome = "${config.homePath}/.local/state"; + configHome = "${config.homePath}/.config"; + + configFile = { + "aacs/keydb.cfg" = { + source = ../files/keys/bluray.cfg; + }; }; - }; - xdg.dataFile = { - fonts = { - source = ../files/fonts; - recursive = true; + dataFile = { + fonts = { + source = ../files/fonts; + recursive = true; + }; }; - }; - xdg.mimeApps = { - enable = true; - defaultApplications = { - # web - "text/html" = "firefox.desktop"; - "x-scheme-handler/http" = "firefox.desktop"; - "x-scheme-handler/https" = "firefox.desktop"; - "x-scheme-handler/about" = "firefox.desktop"; - "x-scheme-handler/unknown" = "firefox.desktop"; + mimeApps = { + enable = true; + defaultApplications = { + # web + "text/html" = "firefox.desktop"; + "x-scheme-handler/http" = "firefox.desktop"; + "x-scheme-handler/https" = "firefox.desktop"; + "x-scheme-handler/about" = "firefox.desktop"; + "x-scheme-handler/unknown" = "firefox.desktop"; - # images - "image/png" = "imv.desktop"; - "image/jpeg" = "imv.desktop"; - "image/webp" = "imv.desktop"; - "image/tga" = "imv.desktop"; - "image/bmp" = "imv.desktop"; - "image/gif" = "imv.desktop"; + # images + "image/png" = "imv.desktop"; + "image/jpeg" = "imv.desktop"; + "image/webp" = "imv.desktop"; + "image/tga" = "imv.desktop"; + "image/bmp" = "imv.desktop"; + "image/gif" = "imv.desktop"; - # audio video - "video/mp4" = "mpv.desktop"; - "video/x-msvideo" = "mpv.desktop"; - "video/mkv" = "mpv.desktop"; - "video/webm" = "mpv.desktop"; - "audio/mp3" = "mpv.desktop"; - "audio/wav" = "mpv.desktop"; + # audio video + "video/mp4" = "mpv.desktop"; + "video/x-msvideo" = "mpv.desktop"; + "video/mkv" = "mpv.desktop"; + "video/webm" = "mpv.desktop"; + "audio/mp3" = "mpv.desktop"; + "audio/wav" = "mpv.desktop"; - # other - "application/pdf" = "org.pwmt.zathura.desktop"; - "x-scheme-handler/mspa" = "unofficial-homestuck-collection.desktop"; - "x-scheme-handler/discord" = "discord.desktop"; - "x-scheme-handler/roblox-player" = "org.vinegarhq.Sober.desktop"; + # other + "application/pdf" = "org.pwmt.zathura.desktop"; + "x-scheme-handler/mspa" = "unofficial-homestuck-collection.desktop"; + "x-scheme-handler/discord" = "discord.desktop"; + "x-scheme-handler/roblox-player" = "org.vinegarhq.Sober.desktop"; + }; }; - }; - xdg.userDirs = { - enable = true; - createDirectories = false; + userDirs = { + enable = true; + createDirectories = false; + + desktop = "${config.homePath}/desktop"; + documents = "${config.homePath}/documents"; + download = "${config.homePath}/downloads"; + music = "${config.homePath}/music"; + pictures = "${config.homePath}/pictures"; + publicShare = "${config.homePath}"; + templates = "${config.homePath}"; + videos = "${config.homePath}/videos"; + }; + }; - desktop = "${config.homePath}/desktop"; - documents = "${config.homePath}/documents"; - download = "${config.homePath}/downloads"; - music = "${config.homePath}/music"; - pictures = "${config.homePath}/pictures"; - publicShare = "${config.homePath}"; - templates = "${config.homePath}"; - videos = "${config.homePath}/videos"; + # remove crap from home dir + home.sessionVariables = { + ANDROID_USER_HOME = "${config.xdg.dataHome}/android"; + BUNDLE_USER_CONFIG = "${config.xdg.configHome}/bundle"; + BUNDLE_USER_CACHE = "${config.xdg.cacheHome}/bundle"; + BUNDLE_USER_PLUGIN = "${config.xdg.dataHome}/bundle"; + CABAL_DIR = "${config.xdg.configHome}/cabal"; + CABAL_CONFIG = "${config.xdg.configHome}/cabal/config"; + CARGO_HOME = "${config.xdg.dataHome}/cargo"; + DOCKER_CONFIG = "${config.xdg.configHome}/docker"; + DOTNET_CLI_HOME = "${config.xdg.dataHome}/dotnet"; + EM_CACHE = "${config.xdg.cacheHome}/emscripten"; + FCEUX_HOME = "${config.xdg.configHome}/fceux"; + GRADLE_USER_HOME = "${config.xdg.dataHome}/gradle"; + HISTFILE = "${config.xdg.stateHome}/bash/history"; + JULIA_DEPOT_PATH = "${config.xdg.dataHome}/julia"; + LEIN_HOME = "${config.xdg.dataHome}/lein"; + MIN_HOME = "${config.xdg.dataHome}/mix"; + NODE_REPL_HISTORY = "${config.xdg.stateHome}/node_repl_history"; + NUGET_PACKAGES = "${config.xdg.cacheHome}/NuGetPackages"; + OPAMROOT = "${config.xdg.dataHome}/opam"; + PYTHON_HISTORY = "${config.xdg.stateHome}/python_history"; + RENPY_PATH_TO_SAVES = "${config.xdg.dataHome}/renpy"; + RUSTUP_HOME = "${config.xdg.dataHome}/rustup"; + SCREENDIR = "${config.xdg.dataHome}/screen"; + SQLITE_HISTORY = "${config.xdg.cacheHome}/sqlite_history"; + TEXMFVAR = "${config.xdg.cacheHome}/texlive/texmf-var"; + W3M_DIR = "${config.xdg.dataHome}/w3m"; + WINEPREFIX = "${config.xdg.dataHome}/wine"; + XCOMPOSECACHE = "${config.xdg.cacheHome}/X11/compose"; + _JAVA_OPTIONS = "-Djava.util.prefs.userRoot=${config.xdg.configHome}/java"; }; programs.home-manager.enable = true; diff --git a/home/gpg.nix b/home/gpg.nix index a1d286d..5500fec 100644 --- a/home/gpg.nix +++ b/home/gpg.nix @@ -8,6 +8,7 @@ # install keys into gpg keyring programs.gpg = { enable = true; + homedir = "${config.xdg.dataHome}/gnupg"; publicKeys = map (path: { diff --git a/home/gtk/default.nix b/home/gtk/default.nix index b7ce33b..873f9de 100644 --- a/home/gtk/default.nix +++ b/home/gtk/default.nix @@ -39,6 +39,7 @@ in { package = pkgs.adw-gtk3; name = "adw-gtk3"; }; + gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc"; gtk3.extraConfig.gtk-application-prefer-dark-theme = 1; }; diff --git a/home/tmux/default.nix b/home/tmux/default.nix index ea8e525..69abbf7 100644 --- a/home/tmux/default.nix +++ b/home/tmux/default.nix @@ -8,7 +8,7 @@ ]; home.file = { - ".tmux.conf".source = ./tmux.conf; + ".config/tmux/tmux.conf".source = ./tmux.conf; ".local/bin/tmux_window".source = ./tmux_window; }; } diff --git a/home/zsh/default.nix b/home/zsh/default.nix index 6af8cf1..f6706af 100644 --- a/home/zsh/default.nix +++ b/home/zsh/default.nix @@ -14,6 +14,7 @@ history.size = 10000; profileExtra = lib.fileContents ./zprofile; initContent = lib.fileContents ./zshrc; + dotDir = "${config.xdg.configHome}/zsh"; }; programs.zoxide = { diff --git a/home/zsh/zprofile b/home/zsh/zprofile index fc0fd72..e159154 100644 --- a/home/zsh/zprofile +++ b/home/zsh/zprofile @@ -3,3 +3,6 @@ if [ -n "$TMUX" ]; then return fi + +# setup homemanager +source /etc/profiles/per-user/"$USER"/etc/profile.d/hm-session-vars.sh diff --git a/home/zsh/zshrc b/home/zsh/zshrc index 196c345..dbcc1cb 100644 --- a/home/zsh/zshrc +++ b/home/zsh/zshrc @@ -10,7 +10,7 @@ export LC_ALL=en_US.UTF-8 # set history HISTSIZE=10000 SAVEHIST=10000 -HISTFILE=~/.histfile +HISTFILE="$XDG_STATE_HOME"/zsh/history # check for non-interactive shell if [[ $- != *i* ]] @@ -29,7 +29,7 @@ bindkey -v tabs autoload compinit -compinit +compinit -d "$XDG_CACHE_HOME"/zsh/zcompdump-"$ZSH_VERSION" autoload -U colors && colors setopt promptsubst @@ -1 +1,2 @@ experimental-features = nix-command flakes +use-xdg-base-directories = true diff --git a/system/default.nix b/system/default.nix index 6ef7b9c..08e131e 100644 --- a/system/default.nix +++ b/system/default.nix @@ -23,6 +23,7 @@ # allow flakes nix.settings.experimental-features = ["nix-command" "flakes"]; + nix.settings.use-xdg-base-directories = true; # allow unfree packages nixpkgs.config.allowUnfree = true; @@ -65,8 +66,6 @@ libz openssl shared-mime-info - # shell - bash # utility curl dig @@ -90,6 +89,7 @@ # system shell programs.zsh.enable = true; + programs.bash.enable = true; # use the latest kernel boot.kernelPackages = pkgs.linuxPackages_latest; |