mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
fix(steam): better data management and setup
This commit is contained in:
parent
81bd1a1a15
commit
475273692d
5 changed files with 822 additions and 284 deletions
|
|
@ -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;
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
|
|
|
|||
|
|
@ -3,5 +3,9 @@
|
|||
in {
|
||||
services.steam.accountSwitch = {
|
||||
enable = mkDefault true;
|
||||
machines = {
|
||||
hourai.owner = "arc";
|
||||
chen.owner = "kat";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue