aboutsummaryrefslogtreecommitdiff
path: root/nix/NIX.md
blob: aa945acc649bb79ff5761fc0adedac9bee4b367d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# Running on Nix

## Putting it in your system configuration

### On flakes-enabled nix

#### Directly installing

The `prismlauncher` flake provides a package which you can install along with
the rest of your packages

```nix
# In your flake.nix:
{
  inputs = {
    prismlauncher.url = "github:PrismLauncher/PrismLauncher";
  };
}
```

```nix
# And in your system configuration:
environment.systemPackages = [ prismlauncher.packages.${pkgs.system}.prismlauncher ];

# Or in your home-manager configuration:
home.packages = [ prismlauncher.packages.${pkgs.system}.prismlauncher ];
```

#### Using the overlay

Alternatively, you can overlay the prismlauncher version in nixpkgs which will
allow you to install using `pkgs` as you normally would while also using the
latest version

```nix
# In your flake.nix:
{
  inputs = {
    prismlauncher.url = "github:PrismLauncher/PrismLauncher";
  };
}
```

```nix
# And in your system configuration:
nixpkgs.overlays = [ inputs.prismlauncher.overlay ];
environment.systemPackages = [ pkgs.prismlauncher ];

# Or in your home-manager configuration:
config.nixpkgs.overlays = [ inputs.prismlauncher.overlay ];
home.packages = [ pkgs.prismlauncher ];
```

### Without flakes-enabled nix

<details>
<summary>Using channels</summary>

```sh
nix-channel --add https://github.com/PrismLauncher/PrismLauncher/archive/master.tar.gz prismlauncher
nix-channel --update prismlauncher
nix-env -iA prismlauncher
```

</details>

<details>
<summary>Using the overlay</summary>

```nix
# In your configuration.nix:
{
  nixpkgs.overlays = [
    (import (builtins.fetchTarball "https://github.com/PrismLauncher/PrismLauncher/archive/develop.tar.gz")).overlay
  ];

  environment.systemPackages = with pkgs; [ prismlauncher ];
}
```

</details>

## Running ad-hoc

If you're on a flakes-enabled nix you can run the launcher in one-line

```sh
nix run github:PrismLauncher/PrismLauncher
```