mirror of
https://github.com/lelgenio/dzgui-nix.git
synced 2024-12-24 20:05:35 -03:00
refactor: Deprecate NixOs module
This commit is contained in:
parent
995dd52adc
commit
dae45d19c1
47
README.md
47
README.md
|
@ -2,7 +2,7 @@ Install dzgui on nix-based systems
|
||||||
|
|
||||||
# Installation
|
# Installation
|
||||||
|
|
||||||
## Using flake profiles (not recommended)
|
## Using flake profiles
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# install
|
# install
|
||||||
|
@ -12,26 +12,28 @@ nix profile install github:lelgenio/dzgui-nix
|
||||||
nix profile upgrade '.*dzgui.*'
|
nix profile upgrade '.*dzgui.*'
|
||||||
```
|
```
|
||||||
|
|
||||||
### You will also *need* to set `vm.max_map_count`:
|
## On non flake NixOs systems
|
||||||
|
|
||||||
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
|
||||||
{
|
{
|
||||||
boot.kernel.sysctl."vm.max_map_count" = 1048576;
|
environment.systemPackages = [
|
||||||
|
dzgui
|
||||||
|
];
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
#### on non-NixOs systems:
|
## As part of a NixOs system flake
|
||||||
|
|
||||||
```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`.
|
||||||
|
|
||||||
|
@ -50,18 +52,19 @@ Flake users are assumed to have a `flake.nix` file and a `configuration.nix`.
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
2 - Add the `dzgui-nix` module to your system configuration, and enable it:
|
2 - Add the `dzgui` package to your environment packages:
|
||||||
|
|
||||||
```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
|
{
|
||||||
inputs.dzgui-nix.nixosModules.default
|
environment.systemPackages = [
|
||||||
# Enable it, this can also go in configuration.nix
|
inputs.dzgui-nix.packages.default
|
||||||
{ programs.dzgui.enable = true; }
|
];
|
||||||
|
}
|
||||||
# other modules...
|
# other modules...
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
@ -80,7 +83,3 @@ Now dzgui will update together with your flake:
|
||||||
```sh
|
```sh
|
||||||
nix flake update
|
nix flake update
|
||||||
```
|
```
|
||||||
|
|
||||||
## On non flake systems
|
|
||||||
|
|
||||||
Good luck.
|
|
||||||
|
|
|
@ -22,7 +22,11 @@
|
||||||
|
|
||||||
nixosModules = rec {
|
nixosModules = rec {
|
||||||
default = dzgui;
|
default = dzgui;
|
||||||
dzgui = import ./module.nix;
|
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);
|
||||||
};
|
};
|
||||||
|
|
||||||
devShells.${system}.default = pkgs.mkShell {
|
devShells.${system}.default = pkgs.mkShell {
|
||||||
|
|
Loading…
Reference in a new issue