diff --git a/osConfigs/global.nix b/osConfigs/global.nix index 5c9929c..54957cd 100644 --- a/osConfigs/global.nix +++ b/osConfigs/global.nix @@ -1,16 +1,16 @@ # **************************************************************************** # # # # ::: :::::::: # -# configuration.nix :+: :+: :+: # +# global.nix :+: :+: :+: # # +:+ +:+ +:+ # # By: tomoron +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2025/02/09 01:43:46 by tomoron #+# #+# # -# Updated: 2025/02/09 01:50:15 by tomoron ### ########.fr # +# Updated: 2025/02/09 03:04:10 by tomoron ### ########.fr # # # # **************************************************************************** # -{ config, lib, inputs, pkgs, flakeName, ... }: +{ lib, pkgs, flakeName, ... }: { imports = [ diff --git a/osConfigs/hosts/laptop.nix b/osConfigs/hosts/laptop.nix index 2db9bd2..768bb71 100644 --- a/osConfigs/hosts/laptop.nix +++ b/osConfigs/hosts/laptop.nix @@ -6,6 +6,7 @@ ../modules/nvidia.nix ../modules/vboxHost.nix ]; + boot.kernelParams = [ "kvm.enable_virt_at_load=0" ]; # systemd.tmpfiles.rules = [ # "f /dev/shm/looking-glass 0660 tom libvirtd -" diff --git a/osConfigs/modules/game.nix b/osConfigs/modules/game.nix index 0a835f1..8caf089 100644 --- a/osConfigs/modules/game.nix +++ b/osConfigs/modules/game.nix @@ -1,10 +1,14 @@ -{ config, lib, inputs, pkgs, ... }: +{config, lib, ... }: { - programs.steam.enable=true; - programs.steam.protontricks.enable=true; + options.mods.gayming.enable = lib.mkOption { + type = lib.types.bool; + default = true; + description = "enable games on the host"; + }; -# environment.systemPackages = with pkgs; [ qemu quickemu]; -# programs.virt-manager.enable = true; -# virtualisation.libvirtd.enable = true; + config = lib.mkIf config.mods.gayming.enable { + programs.steam.enable = true; + programs.steam.protontricks.enable = true; + }; } diff --git a/osConfigs/modules/nvidia.nix b/osConfigs/modules/nvidia.nix index 02a603c..5e9dd1c 100644 --- a/osConfigs/modules/nvidia.nix +++ b/osConfigs/modules/nvidia.nix @@ -2,10 +2,19 @@ { config, lib, inputs, pkgs, ... }: { - hardware.graphics = { - enable = true; - enable32Bit = true; + options.mods.nvidia-graphics.enable = lib.mkOption { + type = lib.types.bool; + default = true; + description = "enable my nvidia graphics settings"; + }; + + config = lib.mkIf config.mods.nvidia-graphics.enable { + hardware.graphics = { + enable = true; + enable32Bit = true; + }; + + services.xserver.videoDrivers = ["nvidia"]; }; - services.xserver.videoDrivers = ["nvidia"]; } diff --git a/osConfigs/modules/vboxHost.nix b/osConfigs/modules/vboxHost.nix index 1dbb97c..49facef 100644 --- a/osConfigs/modules/vboxHost.nix +++ b/osConfigs/modules/vboxHost.nix @@ -1,6 +1,14 @@ { config, lib, inputs, pkgs, ... }: { - virtualisation.virtualbox.host.enable = true; - users.users.tom.extraGroups = [ "vboxusers" ]; + options.mods.virtualbox.enable = lib.mkOption { + type = lib.types.bool; + default = true; + description = "enable virtualbox as host"; + }; + + config = lib.mkIf config.mods.virtualbox.enable { + virtualisation.virtualbox.host.enable = true; + users.users.tom.extraGroups = [ "vboxusers" ]; + }; } diff --git a/osConfigs/modules/yubikey.nix b/osConfigs/modules/yubikey.nix index b456e5b..d454a62 100644 --- a/osConfigs/modules/yubikey.nix +++ b/osConfigs/modules/yubikey.nix @@ -1,14 +1,29 @@ { config, lib, inputs, pkgs, ... }: { - programs.gnupg.agent = { - enable = true; - enableSSHSupport = true; + options.mods.yubikey = { + enable = lib.mkOption { + type = lib.types.bool; + default = true; + description = "enable yubikey"; + }; + + id = lib.mkOption { + type = lib.str; + description = "yubikey id"; + }; }; - security.pam.yubico = { - enable = true; - id = "30536547"; - mode = "challenge-response"; + config = lib.mkIf config.mods.yubikey.enable { + programs.gnupg.agent = { + enable = true; + enableSSHSupport = true; + }; + + security.pam.yubico = { + enable = true; + id = config.mods.yubikey.id; + mode = "challenge-response"; + }; }; }