nixos/home/minecraft/home.nix
2025-01-13 11:52:09 +08:00

28 lines
470 B
Nix

{
pkgs,
lib,
config,
...
}:
with lib;
let
inherit (config.passthrough) gui;
cfg = config.passthrough.minecraft;
enable = cfg.enable && config.home.username == cfg.user;
in
mkIf enable {
home.packages =
with pkgs;
[
jdk8
]
++ optional gui prismlauncher;
wayland.windowManager.sway.config.window.commands = mkIf gui [
{
criteria.app_id = "org.prismlauncher.PrismLauncher";
command = "floating enable";
}
];
}