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
sydnix.impermanence.directories =
let xdg-state-dir =
"${config.home.stateHome
or "${config.home.homeDirectory}/.local/state"}";
config.home.statehome
or "${config.home.homeDirectory}/.local/state";
in [
# HACK: This relies on behaviour that is not explicitly defined by the
# Syncthing Home-manager module. We have to trust that $XDG_STATE_DIR,

View File

@@ -37,10 +37,25 @@
}
'';
# Some global Cabal configuration.
xdg.configFile.".cabal/config".text = ''
-- Globally-enable Nix integration. See
-- https://cabal.readthedocs.io/en/3.4/nix-integration.html
nix: True
'';
sydnix.impermanence.cache.directories =
let xdg-cache-dir =
config.home.cacheHome
or "${config.home.homeDirectory}/.cache";
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
# '';
}