Files
nix-config/hardening/nixpaks/modules/xdg-storage.nix
T
ryan4yin | 二花 08d2ff7578 feat(nixpak): sandbox umu-launcher with ~/Gaming as its home (#519)
* feat(nixpak): sandbox umu-launcher with ~/Games as its home

umu-run, winetricks and bbe leave the host PATH, so umu launchers
generated before this stop working until rewritten with
`umu-install.nu <name> - <launcher> <gameid>`.

Assisted-by: Claude Agent SDK (claude-opus-5-5)

* refactor(nixpak): mount ~/Gaming as the game sandbox home

idols-ai now preserves ~/Gaming instead of ~/Games, so existing games
vanish from the host after deploy until the preserved ~/Games is moved
to ~/Gaming/Games.

Assisted-by: Claude Agent SDK (claude-opus-5-5)

* docs(nixpak): record umu runtime validation

Assisted-by: Claude Agent SDK (claude-opus-5-5)
Assisted-by: DeepSeek Harness (deepseek-flash)
2026-11-05 22:39:48 -06:00

38 lines
794 B
Nix

# Private XDG directories under ~/.var/app/<appId>, mounted over the host's.
# Game launchers turn this off and mount a whole private home instead (see
# gaming-policy.nix): games also write outside XDG, straight into $HOME.
{
config,
lib,
sloth,
...
}:
{
options.xdgStorage.enable =
lib.mkEnableOption "private per-app XDG cache, config, data and state directories"
// {
default = true;
};
config.bubblewrap.bind.rw = lib.mkIf config.xdgStorage.enable (
with sloth;
[
[
(mkdir appCacheDir)
xdgCacheHome
]
[
(mkdir appConfigDir)
xdgConfigHome
]
[
(mkdir appDataDir)
xdgDataHome
]
[
(mkdir (concat' appDir "/state"))
xdgStateHome
]
]
);
}