fix(steam): better data management and setup

This commit is contained in:
arcnmx 2024-02-16 10:49:55 -08:00
parent 81bd1a1a15
commit 475273692d
5 changed files with 822 additions and 284 deletions

View file

@ -7,7 +7,7 @@
inherit (lib.modules) mkIf mkMerge mkDefault;
inherit (lib.strings) removePrefix;
inherit (lib.attrsets) listToAttrs nameValuePair;
inherit (config.services.steam) accountSwitch;
inherit (config.services.steam) accountSwitch beatsaber;
cfg = config.kyuuto;
in {
options.kyuuto = with lib.types; {
@ -106,11 +106,15 @@ in {
enable = mkIf cfg.setup true;
files = mkMerge [
(mkIf cfg.setup (mkMerge setupFiles))
(mkIf accountSwitch.enable {
(mkIf (accountSwitch.enable || beatsaber.setup) {
${accountSwitch.gamesDir} = {
type = "bind";
bindReadOnly = true;
src = cfg.gameLibraryDir + "/PC";
systemd.mountSettings = rec {
wantedBy = mkIf beatsaber.setup beatsaber.setupServiceNames;
before = wantedBy;
};
};
})
];

View file

@ -3,5 +3,9 @@
in {
services.steam.accountSwitch = {
enable = mkDefault true;
machines = {
hourai.owner = "arc";
chen.owner = "kat";
};
};
}