diff --git a/README.md b/README.md index 6b43d58..b1100cd 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Install dzgui on nix-based systems # Installation -## Using flake profiles +## Using flake profiles (not recommended) ```sh # install @@ -12,28 +12,26 @@ nix profile install github:lelgenio/dzgui-nix nix profile upgrade '.*dzgui.*' ``` -## On non flake NixOs systems +### You will also *need* to set `vm.max_map_count`: + +This is done automatically if you install via NixOs modules as shown + +#### on NixOs systems: ```nix # configuration.nix -{ pkgs, ... }: -let - dzgui-nix = pkgs.fetchFromGitHub { - owner = "lelgenio"; - repo = "dzgui-nix"; - rev = "995dd52adc6fe5cbbd4530a9f2add88e1e04d0da"; - hash = "sha256-giMAU0PqMOqTe3zQax4rTbhu5efyFcaQu3EP5CqPIaU="; - }; - dzgui = (pkgs.callPackage "${dzgui-nix}/package"); -in { - environment.systemPackages = [ - dzgui - ]; + boot.kernel.sysctl."vm.max_map_count" = 1048576; } ``` -## As part of a NixOs system flake +#### on non-NixOs systems: + +```sh +sudo sysctl -w vm.max_map_count | sudo tee /etc/sysctl.d/dayz.conf +``` + +## As a NixOs module (recommended) Flake users are assumed to have a `flake.nix` file and a `configuration.nix`. @@ -52,19 +50,18 @@ Flake users are assumed to have a `flake.nix` file and a `configuration.nix`. } ``` -2 - Add the `dzgui` package to your environment packages: +2 - Add the `dzgui-nix` module to your system configuration, and enable it: ```nix # flake.nix { outputs = inputs@{pkgs, ...}: { nixosConfigurations.your-hostname-here = lib.nixosSystem { - modules = [ - { - environment.systemPackages = [ - inputs.dzgui-nix.packages.default - ]; - } + modules = [ + # Add the module + inputs.dzgui-nix.nixosModules.default + # Enable it, this can also go in configuration.nix + { programs.dzgui.enable = true; } # other modules... ]; }; @@ -83,3 +80,7 @@ Now dzgui will update together with your flake: ```sh nix flake update ``` + +## On non flake systems + +Good luck. diff --git a/flake.nix b/flake.nix index 479b6ff..d7e1de5 100644 --- a/flake.nix +++ b/flake.nix @@ -22,11 +22,7 @@ nixosModules = rec { default = dzgui; - dzgui = pkgs.lib.warn ( - "The dzgui NixOs module is deprecated and will be removed in the future, " - + "check https://github.com/lelgenio/dzgui-nix/blob/main/README.md " - + "for instructions on how to install dzgui as a regular package" - ) (import ./module.nix); + dzgui = import ./module.nix; }; devShells.${system}.default = pkgs.mkShell {