2022-10-22 03:34:35 +05:30
|
|
|
# Running on Nix
|
2022-01-08 20:57:47 +05:30
|
|
|
|
2022-10-22 03:34:35 +05:30
|
|
|
## Putting it in your system configuration
|
|
|
|
|
|
|
|
### On flakes-enabled nix
|
|
|
|
|
|
|
|
#### Directly installing
|
|
|
|
|
2022-11-02 00:19:21 +05:30
|
|
|
The `pollymc` flake provides a package which you can install along with
|
2022-10-22 03:34:35 +05:30
|
|
|
the rest of your packages
|
2022-07-13 00:23:51 +05:30
|
|
|
|
2022-01-08 20:57:47 +05:30
|
|
|
```nix
|
2022-10-22 03:34:35 +05:30
|
|
|
# In your flake.nix:
|
2022-07-12 21:04:57 +05:30
|
|
|
{
|
|
|
|
inputs = {
|
2022-11-02 00:19:21 +05:30
|
|
|
pollymc.url = "github:fn2006/PollyMC";
|
2022-07-12 21:04:57 +05:30
|
|
|
};
|
2022-10-22 03:34:35 +05:30
|
|
|
}
|
|
|
|
```
|
2022-01-08 20:57:47 +05:30
|
|
|
|
2022-10-22 03:34:35 +05:30
|
|
|
```nix
|
|
|
|
# And in your system configuration:
|
2022-11-02 00:19:21 +05:30
|
|
|
environment.systemPackages = [ pollymc.packages.${pkgs.system}.pollymc ];
|
2022-01-08 20:57:47 +05:30
|
|
|
|
2022-10-22 03:34:35 +05:30
|
|
|
# Or in your home-manager configuration:
|
2022-11-02 00:19:21 +05:30
|
|
|
home.packages = [ pollymc.packages.${pkgs.system}.pollymc ];
|
2022-10-22 03:34:35 +05:30
|
|
|
```
|
|
|
|
|
|
|
|
#### Using the overlay
|
|
|
|
|
2022-11-02 00:19:21 +05:30
|
|
|
Alternatively, you can overlay the pollymc version in nixpkgs which will
|
2022-10-22 03:34:35 +05:30
|
|
|
allow you to install using `pkgs` as you normally would while also using the
|
|
|
|
latest version
|
|
|
|
|
|
|
|
```nix
|
|
|
|
# In your flake.nix:
|
|
|
|
{
|
|
|
|
inputs = {
|
2022-11-02 00:19:21 +05:30
|
|
|
pollymc.url = "github:fn2006/PollyMC";
|
2022-10-22 03:34:35 +05:30
|
|
|
};
|
2022-07-12 21:04:57 +05:30
|
|
|
}
|
2022-01-08 20:57:47 +05:30
|
|
|
```
|
|
|
|
|
2022-10-22 03:34:35 +05:30
|
|
|
```nix
|
|
|
|
# And in your system configuration:
|
2022-11-02 00:19:21 +05:30
|
|
|
nixpkgs.overlays = [ inputs.pollymc.overlay ];
|
|
|
|
environment.systemPackages = [ pkgs.pollymc ];
|
2022-10-22 03:34:35 +05:30
|
|
|
|
|
|
|
# Or in your home-manager configuration:
|
2022-11-02 00:19:21 +05:30
|
|
|
config.nixpkgs.overlays = [ inputs.pollymc.overlay ];
|
|
|
|
home.packages = [ pkgs.pollymc ];
|
2022-10-22 03:34:35 +05:30
|
|
|
```
|
|
|
|
|
|
|
|
### Without flakes-enabled nix
|
|
|
|
|
|
|
|
#### Using channels
|
2022-01-08 20:57:47 +05:30
|
|
|
|
2022-07-12 21:04:57 +05:30
|
|
|
```sh
|
2022-11-02 00:19:21 +05:30
|
|
|
nix-channel --add https://github.com/fn2006/PollyMC/archive/master.tar.gz pollymc
|
|
|
|
nix-channel --update pollymc
|
|
|
|
nix-env -iA pollymc
|
2022-01-08 20:57:47 +05:30
|
|
|
```
|
|
|
|
|
2022-10-22 03:34:35 +05:30
|
|
|
#### Using the overlay
|
2022-01-09 19:45:47 +05:30
|
|
|
|
2022-07-12 21:04:57 +05:30
|
|
|
```nix
|
2022-10-22 03:34:35 +05:30
|
|
|
# In your configuration.nix:
|
2022-07-12 21:04:57 +05:30
|
|
|
{
|
|
|
|
nixpkgs.overlays = [
|
2022-11-02 00:19:21 +05:30
|
|
|
(import (builtins.fetchTarball "https://github.com/fn2006/PollyMC/archive/develop.tar.gz")).overlay
|
2022-07-12 21:04:57 +05:30
|
|
|
];
|
2022-01-09 19:47:52 +05:30
|
|
|
|
2022-11-02 00:19:21 +05:30
|
|
|
environment.systemPackages = with pkgs; [ pollymc ];
|
2022-07-12 21:04:57 +05:30
|
|
|
}
|
2022-01-13 19:13:29 +05:30
|
|
|
```
|
2022-10-22 03:34:35 +05:30
|
|
|
|
|
|
|
## Running ad-hoc
|
|
|
|
|
|
|
|
If you're on a flakes-enabled nix you can run the launcher in one-line
|
|
|
|
|
|
|
|
```sh
|
2022-11-02 00:19:21 +05:30
|
|
|
nix run github:fn2006/PollyMC
|
2022-10-22 03:34:35 +05:30
|
|
|
```
|