The goal of this project is to provide Shadow on NixOS with a dynamic derivation to handle frequent updates.
This repository is a fork of the great work of NicolasGuilloux & Elyhaka on the Shadow on NixOS project. The purpose of this fork is to continue to maintain this project with the latest NixOS & Shadow versions.
Note that the ref value (v*.*.*
) should point to the lastest release. Checkout the tags to know it. The version is the derivation one, not the launcher nor the streamer version. Installing any version of this repository will always install the latest version of the launcher available.
If you want the latest package derivation, use ref = "main"
instead.
In your configuration.nix
:
{
imports = [
(fetchGit { url = "https://github.com/anthonyroussel/shadow-nix"; ref = "refs/tags/v1.5.0"; } + "/import/system.nix")
];
programs.shadow-client = {
# Enabled by default when using import
# enable = true;
channel = "prod";
};
}
In your home.nix
:
{
imports = [
(fetchGit { url = "https://github.com/anthonyroussel/shadow-nix"; ref = "refs/tags/v1.5.0"; } + "/import/home-manager.nix")
];
programs.shadow-client = {
# Enabled by default when using import
# enable = true;
channel = "preprod";
};
}
This is the configuration of the package itself. You can set them via programs.shadow-client.<key>
.
Key | Type | Default | Possible values | Description |
---|---|---|---|---|
enable | bool | false | true, false | Enable the package |
channel | enum | prod | prod, preprod, testing | prod is stable, preprod is beta, testing is alpha |
extraChannels | [enum] | [] | [ "prod" "preprod" "testing" ] | prod is stable, preprod is beta, testing is alpha |
launchArgs | string | Add launch arguments to the renderer | ||
enableDesktopLauncher | bool | true | true, false | Creates a .desktop entry |
enableDiagnostics | bool | false | true, false | Provide debug tools |
forceDriver | enum | null | iHD, i965, radeon, radeonsi | Force the LIBVA driver |
enableGpuFix | bool | true | true, false | Create the drirc file to fix some driver related issues |
This package also provides a standalone session with only the necessary component to start Openbox and Shadow. You can set the configuration via programs.shadow-client.x-session.<key>
.
Key | Type | Default | Possible values | Description |
---|---|---|---|---|
enable | bool | false | true, false | Enable the standalone XSession |
additionalMenuEntries | {} | Additional menu entries for the Openbox right click menu | ||
startScript | string | Additional start option to be executed when Openbox starts |
This package provides a standalone systemd daemon to start only the client wrapped into Xorg in a TTY. You can set the configuration at programs.shadow-client.systemd-session.<key>
.
Key | Type | Default | Possible values | Description |
---|---|---|---|---|
enable | bool | false | true, false | Enable the standalone XSession with Systemd |
user | string | User that will start the session | ||
tty | int | 8 | TTY number where the session will be started | |
onClosingTty | int | null | TTY number that will be selected on closing |
It is important to have vaapi
enabled to make Shadow works correctly. You can find information on this NixOS wiki page.
The following example should work for both AMD and Intel GPU. This is just an example, there is no guarantee that it will work.
{
# Provides the `vainfo` command
environment.systemPackages = with pkgs; [ libva-utils ];
# Hardware hybrid decoding
nixpkgs.config.packageOverrides = pkgs: {
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
};
# Hardware drivers
hardware.opengl = {
enable = true;
extraPackages = with pkgs; [
vaapiIntel
vaapiVdpau
libvdpau-va-gl
intel-media-driver
];
};
}
shadow-nix
follows semantic versioning. In short the scheme is MAJOR.MINOR.PATCH where
- MAJOR is bumped when there is a breaking change,
- MINOR is bumped when a new feature is added in a backward-compatible way,
- PATCH is bumped when a bug is fixed in a backward-compatible way.
Versions below 1.0.0 are considered experimental and breaking changes may occur at any time.
Contributions are welcomed! There are many ways to contribute, and we appreciate all of them. Here are some of the major ones:
- Bug Reports: While we strive for quality software, bugs can happen and we can't fix issues we're not aware of. So please report even if you're not sure about it or just want to ask a question. If anything the issue might indicate that the documentation can still be improved!
- Feature Request: You have a use case not covered by the current api? Want to suggest a change or add something? We'd be glad to read about it and start a discussion to try to find the best possible solution.
- Pull Request: Want to contribute code or documentation? We'd love that! If you need help to get started, GitHub as documentation on pull requests. We use the "fork and pull model" were contributors push changes to their personnal fork and then create pull requests to the main repository. Please make your pull requests against the
main
branch.
As a reminder, all contributors are expected to follow our Code of Conduct.
shadow-nix
is distributed under the terms of the Unlicense license.
This repository was originally created and maintained by Elyhaka and NicolasGuilloux. A big thanks to them for helping me learning Nix!
Made with contrib.rocks.