perf enable
This commit is contained in:
parent
431d471283
commit
93177aa622
|
@ -26,6 +26,16 @@ with lib; {
|
||||||
let unstable = inputs.nixpkgs-unstable.legacyPackages.${pkgs.system};
|
let unstable = inputs.nixpkgs-unstable.legacyPackages.${pkgs.system};
|
||||||
in unstable.linuxKernel.packages.linux_lqx;
|
in unstable.linuxKernel.packages.linux_lqx;
|
||||||
})
|
})
|
||||||
|
(mkIf ((!config.nathan.config.harden) && config.nathan.config.isDesktop
|
||||||
|
&& config.nathan.programs.perf) {
|
||||||
|
# Install perf and related tools
|
||||||
|
environment.systemPackages =
|
||||||
|
let unstable = inputs.nixpkgs-unstable.legacyPackages.${pkgs.system};
|
||||||
|
in [ unstable.linuxKernel.packages.linux_lqx.perf ];
|
||||||
|
# Allow users to use it
|
||||||
|
boot.kernel.sysctl."kernel.perf_event_paranoid" = -1;
|
||||||
|
boot.kernel.sysctl."kernel.kptr_restrict" = lib.mkForce 0;
|
||||||
|
})
|
||||||
(mkIf config.nathan.config.isDesktop {
|
(mkIf config.nathan.config.isDesktop {
|
||||||
# Setup frequency scaling
|
# Setup frequency scaling
|
||||||
powerManagement = {
|
powerManagement = {
|
||||||
|
|
|
@ -118,6 +118,7 @@ in {
|
||||||
# Enabled by default on desktop
|
# Enabled by default on desktop
|
||||||
binfmt = mkDefaultOption "binfmt" config.nathan.config.isDesktop;
|
binfmt = mkDefaultOption "binfmt" config.nathan.config.isDesktop;
|
||||||
};
|
};
|
||||||
|
perf = mkDefaultOption "perf" config.nathan.config.isDesktop;
|
||||||
};
|
};
|
||||||
# Control enabling of hardware support
|
# Control enabling of hardware support
|
||||||
hardware = {
|
hardware = {
|
||||||
|
|
Loading…
Reference in New Issue