2024-01-05 22:24:55 +08:00
|
|
|
{ pkgs
|
|
|
|
, lib
|
|
|
|
, config
|
2024-01-07 21:51:12 +08:00
|
|
|
, ... }: with lib; let
|
2024-05-31 11:20:56 +08:00
|
|
|
inherit (config.passthrough) gui;
|
2024-01-07 21:51:12 +08:00
|
|
|
cfg = config.passthrough.minecraft;
|
2024-05-31 14:00:52 +08:00
|
|
|
enable = cfg.enable && config.home.username == cfg.user;
|
2024-01-07 21:51:12 +08:00
|
|
|
in mkIf enable {
|
2024-01-07 13:57:59 +08:00
|
|
|
home.packages = with pkgs; [
|
|
|
|
jdk8
|
2024-05-31 11:20:56 +08:00
|
|
|
] ++ optional gui prismlauncher;
|
2024-01-16 14:23:33 +08:00
|
|
|
|
2024-05-31 11:20:56 +08:00
|
|
|
wayland.windowManager.sway.config.window.commands = mkIf gui [
|
2024-01-16 14:23:33 +08:00
|
|
|
{ criteria.app_id = "org.prismlauncher.PrismLauncher"; command = "floating enable"; }
|
|
|
|
];
|
2024-01-05 22:24:55 +08:00
|
|
|
}
|