feat(minecraft): add app user capability
This commit is contained in:
parent
a7d23cfec2
commit
ec8116dd92
2 changed files with 8 additions and 2 deletions
|
@ -3,9 +3,11 @@
|
|||
, config
|
||||
, ... }: with lib; let
|
||||
cfg = config.home.minecraft;
|
||||
persist = [ ".local/share/PrismLauncher" ];
|
||||
in {
|
||||
options.home.minecraft = {
|
||||
enable = mkEnableOption "minecraft game launcher and jvm";
|
||||
allUsers = mkEnableOption "set up for all users";
|
||||
};
|
||||
|
||||
config = {
|
||||
|
@ -14,6 +16,7 @@ in {
|
|||
{ passthrough.minecraft = cfg; }
|
||||
];
|
||||
|
||||
users.home.persist.directories = mkIf cfg.enable [ ".local/share/PrismLauncher" ];
|
||||
users.home.persist.directories = with cfg; mkIf (enable && allUsers) persist;
|
||||
users.home.persistApp.directories = with cfg; mkIf (enable && !allUsers) persist;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue