refactor(sys): systemModules -> ooknet
This commit is contained in:
parent
63c39a89ed
commit
104df464f9
52 changed files with 69 additions and 69 deletions
|
|
@ -3,7 +3,7 @@
|
|||
let
|
||||
inherit (lib) mkMerge mkEnableOption mkIf versionAtLeast versionOlder;
|
||||
inherit (builtins) elem;
|
||||
cpu = config.systemModules.host.hardware.cpu;
|
||||
cpu = config.ooknet.host.hardware.cpu;
|
||||
cfg = cpu.amd;
|
||||
kernelVersion = config.boot.kernelPackages.kernel.version;
|
||||
kernelVersionAtLeast = versionAtLeast kernelVersion;
|
||||
|
|
@ -11,7 +11,7 @@ let
|
|||
in
|
||||
|
||||
{
|
||||
options.systemModules.host.hardware.cpu.amd.pstate.enable = mkEnableOption "Enable amd pstate module";
|
||||
options.ooknet.host.hardware.cpu.amd.pstate.enable = mkEnableOption "Enable amd pstate module";
|
||||
|
||||
config = mkIf (elem cpu.type ["amd"]) {
|
||||
environment.systemPackages = [pkgs.amdctl];
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ in
|
|||
./intel.nix
|
||||
];
|
||||
|
||||
options.systemModules.host.hardware.cpu.type = mkOption {
|
||||
options.ooknet.host.hardware.cpu.type = mkOption {
|
||||
type = with types; nullOr (enum ["intel" "amd"]);
|
||||
default = null;
|
||||
description = "Type of cpu system module to use";
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@
|
|||
let
|
||||
inherit (lib) mkIf;
|
||||
inherit (builtins) elem;
|
||||
hardware = config.systemModules.host.hardware.cpu;
|
||||
cpu = config.ooknet.host.hardware.cpu;
|
||||
in
|
||||
|
||||
{
|
||||
# TODO: put kvm/gvt behind virtualization module flag
|
||||
|
||||
config = mkIf (elem hardware.type ["intel"]) {
|
||||
config = mkIf (elem cpu.type ["intel"]) {
|
||||
boot = {
|
||||
kernelModules = ["kvm-intel"];
|
||||
kernelParams = ["i915.fastboot=1" "enable_gvt=1"];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue