added steam impermanence config

This commit is contained in:
Leyla Becker 2025-06-04 22:57:14 -05:00
parent 8c4bd4291d
commit fc294686ba
2 changed files with 24 additions and 10 deletions

View file

@ -10,10 +10,6 @@
"desktop"
"downloads"
"documents"
{
directory = "${config.xdg.dataHome}/Steam";
method = "symlink";
}
];
files = [
".bash_history" # keep shell history around

View file

@ -2,18 +2,36 @@
lib,
pkgs,
config,
osConfig,
...
}: {
options.programs.steam = {
enable = lib.mkEnableOption "enable steam";
};
config = lib.mkIf config.programs.steam.enable {
home.packages = with pkgs; [
steam
steam.run
];
};
config = lib.mkIf config.programs.steam.enable (
lib.mkMerge [
{
home.packages = with pkgs; [
steam
steam.run
];
}
(
lib.mkIf osConfig.host.impermanence.enable {
home.persistence."/persist${config.home.homeDirectory}" = {
directories = [
{
directory = "${config.xdg.dataHome}/Steam";
method = "symlink";
}
];
allowOther = true;
};
}
)
]
);
# TODO: bind impermanence config
}