home(minecraft): add prism launcher

This commit is contained in:
514fpv 2024-01-05 22:24:55 +08:00
parent 6d7360a75e
commit d92ecf02bc
Signed by: koishi
SSH key fingerprint: SHA256:VkIdW3jUIiqecV2WNAje2fGU5lEhN0XZ58DN0NS4pv0
2 changed files with 25 additions and 0 deletions

6
home/minecraft/home.nix Normal file
View file

@ -0,0 +1,6 @@
{ pkgs
, lib
, config
, ... }: with lib; mkIf config.passthrough.minecraft.enable {
home.packages = with pkgs; [ prismlauncher ];
}

19
home/minecraft/nixos.nix Normal file
View file

@ -0,0 +1,19 @@
{ pkgs
, lib
, config
, ... }: with lib; let
cfg = config.home.minecraft;
in {
options.home.minecraft = {
enable = mkEnableOption "minecraft game launcher and jvm";
};
config = {
users.homeModules = [
# this module passes minecraft configuration to home-manager
{ passthrough.minecraft = cfg; }
];
users.home.persist.directories = [ ".local/share/PrismLauncher" ];
};
}