Skip to content

Commit

Permalink
Merge pull request #920 from lorenzleutgeb/patch-1
Browse files Browse the repository at this point in the history
doc: Add NixOS to `INSTALL.md`
  • Loading branch information
PhilippWendler authored May 21, 2024
2 parents ac6f0fa + 4e55c65 commit c393b74
Showing 1 changed file with 35 additions and 0 deletions.
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

0 comments on commit c393b74

Please sign in to comment.