Skip to content

Commit 943055a

Browse files
authored
Merge pull request #13 from ilyist/main
install.mdx: improved nix section and added nixpkgs installation method
2 parents 9c0aa5e + 7e0b640 commit 943055a

File tree

1 file changed

+62
-1
lines changed

1 file changed

+62
-1
lines changed

src/content/docs/using/install.mdx

Lines changed: 62 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,4 +124,65 @@ Browser support is experimental and may be unreliable. Developing extensions or
124124

125125
## Nix
126126

127-
moonlight offers [a Nix flake](https://github.com/moonlight-mod/moonlight/blob/main/flake.nix) which has an overlay to install moonlight on top of Discord. The flake is not monitored, so if it fails to build, please leave an issue.
127+
moonlight offers a [nixpkgs](https://search.nixos.org/packages?show=moonlight) package and a [flake](https://github.com/moonlight-mod/moonlight/blob/main/flake.nix), which has the option to use nightly if the `develop` branch is selected and provides declarative home-manager configuration options.
128+
129+
Please leave an issue on the [nixpkgs](https://github.com/nixos/nixpkgs/issues) or [moonlight](https://github.com/moonlight-mod/moonlight/issues) repository depending on which one you are using in case of a build failure.
130+
131+
### Nixpkgs (recommended)
132+
133+
User-level installation:
134+
135+
```nix title="configuration.nix"
136+
users.users.alice.packages = [
137+
(pkgs.discord.override { withMoonlight = true; })
138+
];
139+
```
140+
141+
System-wide installation:
142+
143+
```nix title="configuration.nix"
144+
environment.systemPackages = [
145+
(pkgs.discord.override { withMoonlight = true; })
146+
];
147+
```
148+
149+
### Flake
150+
151+
```nix title="flake.nix"
152+
{
153+
inputs.moonlight = {
154+
url = "github:moonlight-mod/moonlight"; # Add `/develop` to the flake URL to use nightly.
155+
inputs.nixpkgs.follows = "nixpkgs";
156+
}
157+
}
158+
```
159+
160+
:::note
161+
It's a Nix to JSON converter. It is best to do it imperatively and then look at the `~/.config/moonlight-mod/stable,ptb,canary,development.json`
162+
:::
163+
```nix title="home.nix"
164+
{ inputs, ... }:
165+
{
166+
imports = [
167+
inputs.moonlight.homeModules.default
168+
];
169+
170+
programs.moonlight-mod = {
171+
enable = true;
172+
stable = {
173+
extensions = {
174+
allActivites.enabled = true;
175+
alwaysFocus.enabled = true;
176+
177+
betterEmbedsYT = {
178+
enabled = true;
179+
config = {
180+
fullDescription = false;
181+
expandDescription = true;
182+
};
183+
};
184+
};
185+
};
186+
};
187+
}
188+
```

0 commit comments

Comments
 (0)