1
Fork 0
satellite/home/features/persistence.nix

149 lines
4 KiB
Nix
Raw Normal View History

2024-07-28 20:01:45 +02:00
{ config, ... }:
{
2023-12-12 14:32:06 +01:00
# {{{ Set up my custom imperanence wrapper
satellite.persistence = {
enable = true;
# Actual data/media (eg: projects, images, videos, etc)
at.data.path = "/persist/data";
at.data.prefixDirectories = false;
# App state I want to keep
at.state.path = "/persist/state";
# App state which I should be able to delete on a whim
at.cache.path = "/persist/local/cache";
};
# }}}
2023-06-09 13:17:34 +02:00
# {{{ XDG dirs
# The lack of "~/Desktop" and "~/Downloads" is intentional!
satellite.persistence.at.data.apps.main.directories = [
config.xdg.userDirs.documents
config.xdg.userDirs.pictures
config.xdg.userDirs.music
config.xdg.userDirs.videos
config.xdg.userDirs.extraConfig.XDG_PROJECTS_DIR
2023-06-09 13:17:34 +02:00
];
# }}}
# {{{ OpenTabletDriver
satellite.persistence.at.state.apps.open-tablet-driver.directories = [
"${config.xdg.configHome}/OpenTabletDriver"
2023-06-09 13:17:34 +02:00
];
# }}}
2023-11-04 20:51:56 +01:00
# {{{ Programming tooling
# {{{ Elm
satellite.persistence.at.cache.apps.elm.directories = [ ".elm" ];
2023-06-09 13:17:34 +02:00
# }}}
2023-11-04 20:51:56 +01:00
# {{{ Fly.io
satellite.persistence.at.state.apps.fly-io.directories = [ ".fly" ];
# }}}
# {{{ Haskell
satellite.persistence.at.cache.apps.haskell.directories = [
".ghc"
".stack"
".local/state/cabal"
"${config.xdg.cacheHome}/stack"
"${config.xdg.cacheHome}/ghcide"
"${config.xdg.cacheHome}/cabal"
2023-06-09 13:17:34 +02:00
];
# }}}
# {{{ Nodejs
2023-11-04 20:18:14 +01:00
satellite.persistence.at.cache.apps.nodejs = {
files = [
2024-04-01 05:57:56 +02:00
# ".yarnrc" # auto-generated by yarn
2023-11-04 20:51:56 +01:00
".node_repl_history"
2024-04-01 05:57:56 +02:00
# ".ts_node_repl_history"
2023-11-04 20:18:14 +01:00
];
directories = [
# Node & npm
"${config.xdg.cacheHome}/node-gyp"
".npm"
# Yarn
"${config.xdg.cacheHome}/yarn"
# Pnpm
"${config.xdg.cacheHome}/pnpm"
"${config.xdg.dataHome}/pnpm"
".local/state/pnpm"
];
};
2023-06-09 13:17:34 +02:00
# }}}
2023-11-04 20:51:56 +01:00
# {{{ Purescript
satellite.persistence.at.cache.apps.purescript.directories = [
"${config.xdg.dataHome}/purescript"
"${config.xdg.cacheHome}/spago"
2023-06-09 13:17:34 +02:00
];
# }}}
2023-11-04 20:51:56 +01:00
# {{{ Python
satellite.persistence.at.cache.apps.python = {
2024-07-28 20:01:45 +02:00
files = [ ".python_history" ];
2023-11-04 20:51:56 +01:00
directories = [
".ipython"
".jupyter"
"${config.xdg.dataHome}/jupyter"
"${config.xdg.cacheHome}/pip"
];
};
# }}}
# {{{ Rust
satellite.persistence.at.cache.apps.rust.directories = [
".cargo"
".rustup"
];
# }}}
# }}}
# {{{ Desktop apps
2023-06-09 13:17:34 +02:00
# {{{ QBittorrent
satellite.persistence.at.state.apps.qbittorrent.directories = [
2023-06-09 13:17:34 +02:00
"${config.xdg.configHome}/qBittorrent" # Config options
];
satellite.persistence.at.cache.apps.qbittorrent.directories = [
2023-06-09 13:17:34 +02:00
"${config.xdg.dataHome}/qBittorrent" # Torrent files, logs, etc
];
# }}}
# {{{ Signal
satellite.persistence.at.state.apps.signal.directories = [
2023-06-09 13:17:34 +02:00
"${config.xdg.configHome}/Signal" # Why tf does signal store it's state here 💀
];
# }}}
# {{{ Lutris
# TODO: there might be more to cache in .cache/lutris
satellite.persistence.at.state.apps.lutris.directories = [
2023-06-09 13:17:34 +02:00
"${config.xdg.configHome}/lutris" # General config data
"${config.xdg.cacheHome}/lutris/banners" # Game banners
"${config.xdg.cacheHome}/lutris/coverart" # Game cover art
# Aparently IO intensive stuff like games prefer symlinks?
2024-07-28 20:01:45 +02:00
{
directory = "media/games/lutris";
method = "symlink";
} # Lutris games
2023-06-09 13:17:34 +02:00
];
# }}}
# {{{ Wine
satellite.persistence.at.state.apps.wine.directories = [ ".wine" ];
# }}}
2024-07-28 20:01:45 +02:00
# {{{ Element
satellite.persistence.at.state.apps.element.directories = [ "${config.xdg.configHome}/Element" ];
2023-06-09 13:17:34 +02:00
# }}}
2024-08-30 01:10:41 +02:00
# {{{ Bitwarden
satellite.persistence.at.state.apps.bitwarden.directories = [
"${config.xdg.configHome}/Bitwarden"
];
# }}}
2023-11-04 20:51:56 +01:00
# }}}
2024-01-31 20:26:11 +01:00
# {{{ Cli
2024-07-28 20:01:45 +02:00
# {{{ Sops
2024-01-31 20:26:11 +01:00
satellite.persistence.at.state.apps.sops.directories = [ "${config.xdg.configHome}/sops/age" ];
# }}}
2024-07-28 20:01:45 +02:00
# {{{ QMK
2024-07-26 20:18:26 +02:00
home.sessionVariables.QMK_HOME = "${config.xdg.dataHome}/qmk";
satellite.persistence.at.state.apps.qmk.directories = [ config.home.sessionVariables.QMK_HOME ];
# }}}
2024-01-31 20:26:11 +01:00
# }}}
2023-06-09 13:17:34 +02:00
}