dzgui-nix/README.md

87 lines
1.7 KiB
Markdown
Raw Normal View History

2023-01-22 14:59:45 -03:00
Install dzgui on nix-based systems
# Installation
2023-05-18 08:25:02 -03:00
## Using flake profiles (not recommended)
2023-01-22 14:59:45 -03:00
2023-05-18 08:25:02 -03:00
```sh
2023-01-22 14:59:45 -03:00
# install
nix profile install github:lelgenio/dzgui-nix
# update
nix profile upgrade '.*dzgui.*'
```
2023-05-18 08:25:02 -03:00
### You will also *need* to set `vm.max_map_count`:
2023-01-22 14:59:45 -03:00
2023-05-18 08:25:02 -03:00
This is done automatically if you install via NixOs modules as shown
2023-01-22 14:59:45 -03:00
2023-05-18 08:25:02 -03:00
#### on NixOs systems:
2023-01-22 14:59:45 -03:00
2023-05-18 08:25:02 -03:00
```nix
# configuration.nix
{
boot.kernel.sysctl."vm.max_map_count" = 1048576;
}
```
#### 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`.
1 - Add `dzgui-nix` as a flake input:
2023-01-22 14:59:45 -03:00
```nix
# flake.nix
{
2023-05-18 08:25:02 -03:00
inputs.dzgui-nix = {
2023-01-22 14:59:45 -03:00
# url of this repository, may change in the future
url = "github:lelgenio/dzgui-nix";
# save storage by not having duplicates of packages
inputs.nixpkgs.follows = "nixpkgs";
};
2023-05-18 08:25:02 -03:00
# other inputs...
2023-01-22 14:59:45 -03:00
}
```
2023-05-18 08:25:02 -03:00
2 - Add the `dzgui-nix` module to your system configuration, and enable it:
2023-01-22 14:59:45 -03:00
```nix
# flake.nix
{
outputs = inputs@{pkgs, ...}: {
nixosConfigurations.your-hostname-here = lib.nixosSystem {
2023-05-18 08:25:02 -03:00
modules = [
# Add the module
inputs.dzgui-nix.nixosModules.default
# Enable it, this can also go in configuration.nix
{ programs.dzgui.enable = true; }
# other modules...
];
2023-01-22 14:59:45 -03:00
};
};
}
```
2023-05-18 08:25:02 -03:00
3 - Rebuild your system
2023-01-22 14:59:45 -03:00
2023-05-18 08:25:02 -03:00
```sh
nixos-rebuild --switch --flake .#your-hostname-here
2023-01-22 14:59:45 -03:00
```
2023-05-18 08:25:02 -03:00
Now dzgui will update together with your flake:
2023-01-22 14:59:45 -03:00
```sh
2023-05-18 08:25:02 -03:00
nix flake update
2023-01-22 14:59:45 -03:00
```
## On non flake systems
Good luck.