fix(haskell): Persist Cabal store

This commit is contained in:
Madeleine Sydney
2025-03-04 03:10:59 -07:00
parent 66b5981ee2
commit 1a97b8344c
2 changed files with 23 additions and 8 deletions

View File

@@ -66,8 +66,8 @@ in lib.mkMerge [
# TODO: sydnix.syncthing module # TODO: sydnix.syncthing module
sydnix.impermanence.directories = sydnix.impermanence.directories =
let xdg-state-dir = let xdg-state-dir =
"${config.home.stateHome config.home.statehome
or "${config.home.homeDirectory}/.local/state"}"; or "${config.home.homeDirectory}/.local/state";
in [ in [
# HACK: This relies on behaviour that is not explicitly defined by the # HACK: This relies on behaviour that is not explicitly defined by the
# Syncthing Home-manager module. We have to trust that $XDG_STATE_DIR, # Syncthing Home-manager module. We have to trust that $XDG_STATE_DIR,

View File

@@ -37,10 +37,25 @@
} }
''; '';
# Some global Cabal configuration. sydnix.impermanence.cache.directories =
xdg.configFile.".cabal/config".text = '' let xdg-cache-dir =
-- Globally-enable Nix integration. See config.home.cacheHome
-- https://cabal.readthedocs.io/en/3.4/nix-integration.html or "${config.home.homeDirectory}/.cache";
nix: True in [
''; # We don't want to rebuild Hackage simply due to a reboot, do we? }:)
(lib.removePrefix "${config.home.homeDirectory}/"
"${xdg-cache-dir}/cabal")
];
# # Some global Cabal configuration.
# xdg.configFile."cabal/config".text = ''
# repository hackage.haskell.org
# url: http://hackage.haskell.org/
# nix: True
# remote-repo-cache: /home/crumb/.cache/cabal/packages
# build-summary: /home/crumb/.cache/cabal/logs/build.log
# jobs: $ncpus
# remote-build-reporting: none
# '';
} }