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"
|
"desktop"
|
||||||
"downloads"
|
"downloads"
|
||||||
"documents"
|
"documents"
|
||||||
{
|
|
||||||
directory = "${config.xdg.dataHome}/Steam";
|
|
||||||
method = "symlink";
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
files = [
|
files = [
|
||||||
".bash_history" # keep shell history around
|
".bash_history" # keep shell history around
|
||||||
|
|
|
@ -2,18 +2,36 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
config,
|
config,
|
||||||
|
osConfig,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
options.programs.steam = {
|
options.programs.steam = {
|
||||||
enable = lib.mkEnableOption "enable steam";
|
enable = lib.mkEnableOption "enable steam";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf config.programs.steam.enable {
|
config = lib.mkIf config.programs.steam.enable (
|
||||||
|
lib.mkMerge [
|
||||||
|
{
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
steam
|
steam
|
||||||
steam.run
|
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
|
# TODO: bind impermanence config
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue