nixos/pqos-wrapper: init
This commit is contained in:
@@ -251,6 +251,7 @@
|
|||||||
./programs/pantheon-tweaks.nix
|
./programs/pantheon-tweaks.nix
|
||||||
./programs/partition-manager.nix
|
./programs/partition-manager.nix
|
||||||
./programs/plotinus.nix
|
./programs/plotinus.nix
|
||||||
|
./programs/pqos-wrapper.nix
|
||||||
./programs/projecteur.nix
|
./programs/projecteur.nix
|
||||||
./programs/proxychains.nix
|
./programs/proxychains.nix
|
||||||
./programs/qdmr.nix
|
./programs/qdmr.nix
|
||||||
|
|||||||
27
nixos/modules/programs/pqos-wrapper.nix
Normal file
27
nixos/modules/programs/pqos-wrapper.nix
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{ config
|
||||||
|
, lib
|
||||||
|
, pkgs
|
||||||
|
, ...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
cfg = config.programs.pqos-wrapper;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.programs.pqos-wrapper = {
|
||||||
|
enable = lib.mkEnableOption "PQoS Wrapper for BenchExec";
|
||||||
|
package = lib.mkPackageOption pkgs "pqos-wrapper" { };
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
hardware.cpu.x86.msr.enable = true;
|
||||||
|
|
||||||
|
security.wrappers.${cfg.package.meta.mainProgram} = {
|
||||||
|
owner = "nobody";
|
||||||
|
group = config.hardware.cpu.x86.msr.group;
|
||||||
|
source = lib.getExe cfg.package;
|
||||||
|
capabilities = "cap_sys_rawio=eip";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
meta.maintainers = with lib.maintainers; [ lorenzleutgeb ];
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user