minecraft: added client option

This commit is contained in:
Tigor Hutasuhut 2024-08-05 12:06:07 +07:00
parent c84ee3bd29
commit 5e6617bf1b
6 changed files with 31 additions and 0 deletions

View file

@ -9,6 +9,7 @@ in
./programs
./modules
./games
./direnv.nix
./config/ideavim

6
home/games/default.nix Normal file
View file

@ -0,0 +1,6 @@
{ pkgs, ... }:
{
imports = [
./minecraft.nix
];
}

12
home/games/minecraft.nix Normal file
View file

@ -0,0 +1,12 @@
{ config, lib, pkgs, ... }:
let
cfg = config.profile.games.minecraft;
inherit (lib) mkIf;
in
{
config = mkIf cfg.enable {
home.packages = with pkgs; [
prismlauncher
];
};
}

View file

@ -6,6 +6,7 @@
./docker.nix
./podman.nix
./services.nix
./games.nix
];
options.profile = {

9
options/games.nix Normal file
View file

@ -0,0 +1,9 @@
{ lib, ... }:
let
inherit (lib) mkEnableOption types;
in
{
options.profile.games = {
minecraft.enable = mkEnableOption "Minecraft";
};
}

View file

@ -73,5 +73,7 @@
home.programs.foot.enable = true;
home.programs.zellij.enable = true;
games.minecraft.enable = true;
};
}