forked from jan-leila/nix-config
added steam impermanence config
This commit is contained in:
parent
8c4bd4291d
commit
fc294686ba
2 changed files with 24 additions and 10 deletions
|
@ -10,10 +10,6 @@
|
|||
"desktop"
|
||||
"downloads"
|
||||
"documents"
|
||||
{
|
||||
directory = "${config.xdg.dataHome}/Steam";
|
||||
method = "symlink";
|
||||
}
|
||||
];
|
||||
files = [
|
||||
".bash_history" # keep shell history around
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue