Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: Add NixOS to INSTALL.md #920

Merged
merged 2 commits into from
May 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions doc/INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,41 @@ or whether additional settings are necessary as [described below](#testing-cgrou
Note that [pqos_wrapper] is currently not available as a Debian package
and needs to be installed manually according to its documentation.

### NixOS

For NixOS 24.05 and later, refer to the options:
- [`programs.benchexec.*`](https://search.nixos.org/options?query=programs.benchexec)
to configure BenchExec. The optional dependencies
[cpu-energy-meter], [pqos_wrapper], and [LXCFS] as well as
kernel module loading for access to MSR registers
will all be enabled with BenchExec by default.
To opt out, set the respective `*.enable` option to `false` explicitly.
- [`programs.cpu-energy-meter.*`](https://search.nixos.org/options?query=programs.cpu-energy-meter)
to configure the optional dependency [cpu-energy-meter].
- [`programs.pqos-wrapper.*`](https://search.nixos.org/options?query=programs.pqos-wrapper)
to configure the optional dependency [pqos_wrapper].
- [`virtualisation.lxc.lxcfs.*`](https://search.nixos.org/options?query=virtualisation.lxc.lxcfs)
to configure the optional dependency [LXCFS].
- [`hardware.cpu.x86.msr`](https://search.nixos.org/options?query=hardware.cpu.x86.msr)
to configure access to MSR registers, by default for members of the group `msr`.
- [`users.users.<name>.extraGroups`](https://search.nixos.org/options?show=users.users.<name>.extraGroups)
to add user accounts extra groups such as `msr`
(required for both [cpu-energy-meter] and [pqos_wrapper]).
Note that users are *NOT* added to `msr` by default.
This decision is opt-in for your security.

For example:
```nix
{
programs.benchexec = {
enable = true;
users = [ "<USER>" ];
};

users.users."<USER>".extraGroups = [ "msr" ];
}
```

### Other Distributions

For other distributions we recommend to use the Python package installer pip.
Expand Down