diff options
author | Azat Bahawi <azat@bahawi.net> | 2024-03-31 21:29:27 +0300 |
---|---|---|
committer | Azat Bahawi <azat@bahawi.net> | 2024-03-31 21:29:27 +0300 |
commit | 9a5427e3a0c0ccf2a82dc503149a26b23fbd6004 (patch) | |
tree | f28beec29deeea36038615a8fb98a810891940b5 /modules/nixos/games/minecraft.nix | |
parent | 2024-03-19 (diff) |
2024-03-31
Diffstat (limited to '')
-rw-r--r-- | modules/nixos/games/minecraft.nix | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/modules/nixos/games/minecraft.nix b/modules/nixos/games/minecraft.nix index 8a1a0b5..6e163dc 100644 --- a/modules/nixos/games/minecraft.nix +++ b/modules/nixos/games/minecraft.nix @@ -5,10 +5,12 @@ pkgs, ... }: -with lib; let +with lib; +let cfg = config.nixfiles.modules.games.minecraft; -in { - imports = [inputs.minecraft.nixosModules.minecraft-servers]; +in +{ + imports = [ inputs.minecraft.nixosModules.minecraft-servers ]; options.nixfiles.modules.games.minecraft = { client.enable = mkEnableOption "Minecraft client"; @@ -30,13 +32,11 @@ in { }; config = mkMerge [ - (mkIf cfg.client.enable { - hm.home.packages = [pkgs.prismlauncher]; - }) + (mkIf cfg.client.enable { hm.home.packages = [ pkgs.prismlauncher ]; }) (mkIf cfg.server.enable { - nixfiles.modules.common.nix.allowedUnfreePackages = ["minecraft-server"]; + nixfiles.modules.common.nix.allowedUnfreePackages = [ "minecraft-server" ]; - ark.directories = [config.services.minecraft-servers.dataDir]; + ark.directories = [ config.services.minecraft-servers.dataDir ]; services.minecraft-servers = { enable = true; @@ -78,9 +78,9 @@ in { }; }; - nixpkgs.overlays = [inputs.minecraft.overlay]; + nixpkgs.overlays = [ inputs.minecraft.overlay ]; - my.extraGroups = [config.services.minecraft-servers.group]; + my.extraGroups = [ config.services.minecraft-servers.group ]; }) ]; } |