Compare commits

..

No commits in common. "5d84423df2faeb0d28c2454cc00d89705775803f" and "995dd52adc6fe5cbbd4530a9f2add88e1e04d0da" have entirely different histories.

2 changed files with 25 additions and 28 deletions

View file

@ -2,7 +2,7 @@ Install dzgui on nix-based systems
# Installation # Installation
## Using flake profiles ## Using flake profiles (not recommended)
```sh ```sh
# install # install
@ -12,28 +12,26 @@ nix profile install github:lelgenio/dzgui-nix
nix profile upgrade '.*dzgui.*' 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 ```nix
# configuration.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 = [ boot.kernel.sysctl."vm.max_map_count" = 1048576;
dzgui
];
} }
``` ```
## 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`. 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 ```nix
# flake.nix # flake.nix
{ {
outputs = inputs@{pkgs, ...}: { outputs = inputs@{pkgs, ...}: {
nixosConfigurations.your-hostname-here = lib.nixosSystem { nixosConfigurations.your-hostname-here = lib.nixosSystem {
modules = [ modules = [
{ # Add the module
environment.systemPackages = [ inputs.dzgui-nix.nixosModules.default
inputs.dzgui-nix.packages.default # Enable it, this can also go in configuration.nix
]; { programs.dzgui.enable = true; }
}
# other modules... # other modules...
]; ];
}; };
@ -83,3 +80,7 @@ Now dzgui will update together with your flake:
```sh ```sh
nix flake update nix flake update
``` ```
## On non flake systems
Good luck.

View file

@ -22,11 +22,7 @@
nixosModules = rec { nixosModules = rec {
default = dzgui; default = dzgui;
dzgui = pkgs.lib.warn ( dzgui = import ./module.nix;
"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);
}; };
devShells.${system}.default = pkgs.mkShell { devShells.${system}.default = pkgs.mkShell {