fix(steam): Impermanence + Steam
This commit is contained in:
3
flake.lock
generated
3
flake.lock
generated
@@ -883,9 +883,8 @@
|
||||
"sops-nix": "sops-nix",
|
||||
"stylix": "stylix",
|
||||
"sydnix-cli": "sydnix-cli",
|
||||
"tf2-nix": "tf2-nix",
|
||||
"vpn-confinement": "vpn-confinement"
|
||||
"sydnix-cli": "sydnix-cli",
|
||||
"tf2-nix": "tf2-nix"
|
||||
}
|
||||
},
|
||||
"sops-nix": {
|
||||
|
||||
@@ -13,7 +13,11 @@
|
||||
sydnix = {
|
||||
filesystemType = "btrfs";
|
||||
|
||||
steam.enable = true;
|
||||
steam = {
|
||||
enable = true;
|
||||
impermanenceUsers = ["crumb"];
|
||||
};
|
||||
|
||||
niri.enable = true;
|
||||
stylix.enable = true;
|
||||
qemu.enable = true;
|
||||
|
||||
@@ -19,7 +19,7 @@ in {
|
||||
#
|
||||
# https://github.com/ValveSoftware/steam-for-linux/issues/10552
|
||||
# https://github.com/nix-community/impermanence/issues/165
|
||||
{ directory = ".local/share/Steam"; method = "symlink"; }
|
||||
# { directory = ".local/share/Steam"; method = "symlink"; }
|
||||
{ directory = ".steam"; method = "symlink"; }
|
||||
];
|
||||
|
||||
|
||||
@@ -25,8 +25,9 @@ in {
|
||||
./tf2/quake-hitsounds
|
||||
];
|
||||
};
|
||||
game-dir = ".local/share/Steam/steamapps/common/Team Fortress 2/tf";
|
||||
in {
|
||||
home.file."tf" = {
|
||||
home.file.${game-dir} = {
|
||||
recursive = true;
|
||||
source = my-config;
|
||||
};
|
||||
|
||||
@@ -4,6 +4,16 @@ let cfg = config.sydnix.steam;
|
||||
in {
|
||||
options.sydnix.steam = {
|
||||
enable = lib.mkEnableOption "Steam";
|
||||
impermanenceUsers = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = [];
|
||||
description = ''
|
||||
A list of users for which ~/.local/share/Steam shall be persisted. This
|
||||
is a disgusting hack to get around an issue with Impermanence's
|
||||
home-manager module.
|
||||
https://github.com/nix-community/impermanence/issues/165#issuecomment-2537723929
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
@@ -28,5 +38,14 @@ in {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
|
||||
environment.persistence.${config.sydnix.impermanence.persistDirectory}.users =
|
||||
builtins.listToAttrs
|
||||
(builtins.map
|
||||
(user: {
|
||||
name = user;
|
||||
value.directories = [".local/share/Steam"];
|
||||
})
|
||||
cfg.impermanenceUsers);
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user