From 54e04477ebadbb86296a6896d085c7663d401667 Mon Sep 17 00:00:00 2001 From: Kirill Date: Sun, 16 Aug 2026 15:37:13 +0300 Subject: [PATCH] fix(options): Added options for laptop and nvidia mod --- host/ThinkPad/configuration.nix | 4 ++++ host/modules/common.nix | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/host/ThinkPad/configuration.nix b/host/ThinkPad/configuration.nix index c7fc08f..c55779b 100644 --- a/host/ThinkPad/configuration.nix +++ b/host/ThinkPad/configuration.nix @@ -8,6 +8,7 @@ ./modules/grab.nix ./modules/swap.nix ./modules/intel.nix + ./modules/grab.nix ./modules/nvidia.nix ./modules/fingerprint.nix @@ -29,6 +30,9 @@ }) ]; + host.laptop = true; + host.nvidia.prime.enable = true; + programs.gamemode.enable = true; hardware.bluetooth.enable = true; services.printing.enable = true; diff --git a/host/modules/common.nix b/host/modules/common.nix index c3a3463..6960276 100644 --- a/host/modules/common.nix +++ b/host/modules/common.nix @@ -6,6 +6,26 @@ ./packages.nix ]; + options = { + host = { + laptop = lib.mkEnableOption "laptop mode"; + + nvidia.prime = { + enable = lib.mkEnableOption "NVIDIA PRIME offload for hybrid graphics"; + intelBusId = lib.mkOption { + type = lib.types.str; + default = "PCI:0:2:0"; + description = "Intel/iGPU Bus ID used by NVIDIA PRIME."; + }; + nvidiaBusId = lib.mkOption { + type = lib.types.str; + default = "PCI:1:0:0"; + description = "NVIDIA dGPU Bus ID used by NVIDIA PRIME."; + }; + }; + }; + }; + config = { networking.hostName = hostname; time.timeZone = lib.mkDefault "Europe/Moscow";