diff options
| author | Tim Keller <tjk@tjkeller.xyz> | 2026-06-17 18:37:23 -0500 |
|---|---|---|
| committer | Tim Keller <tjk@tjkeller.xyz> | 2026-06-17 18:37:23 -0500 |
| commit | 8e302e700751aa82e3c2976147f848963b37303a (patch) | |
| tree | 9782b87587cccced42773ebdde31d75618e6f05f /archetypes | |
| parent | 20256167c33db9c6b762a5bcf0b6678de45653d0 (diff) | |
| download | nixos-8e302e700751aa82e3c2976147f848963b37303a.tar.xz nixos-8e302e700751aa82e3c2976147f848963b37303a.zip | |
mv nvidia packages to collection
Diffstat (limited to 'archetypes')
| -rw-r--r-- | archetypes/collections/nvidia.nix | 14 | ||||
| -rw-r--r-- | archetypes/default.nix | 1 | ||||
| -rw-r--r-- | archetypes/profiles/cuda/default.nix | 8 |
3 files changed, 18 insertions, 5 deletions
diff --git a/archetypes/collections/nvidia.nix b/archetypes/collections/nvidia.nix new file mode 100644 index 0000000..ce22e8b --- /dev/null +++ b/archetypes/collections/nvidia.nix @@ -0,0 +1,14 @@ +{ pkgs, lib, config, ... }: let + cfg = config._archetypes.collections.nvidia; +in { + options._archetypes.collections.nvidia = { + enable = lib.mkEnableOption "enables nvidia debugging packages, etc."; + }; + + config = lib.mkIf cfg.enable { + environment.systemPackages = with pkgs; [ + config.hardware.nvidia.package # nvidia-smi + nvtopPackages.nvidia + ]; + }; +} diff --git a/archetypes/default.nix b/archetypes/default.nix index 0780d31..f306073 100644 --- a/archetypes/default.nix +++ b/archetypes/default.nix @@ -6,6 +6,7 @@ ./collections/filesystems.nix ./collections/fonts.nix ./collections/neovim.nix + ./collections/nvidia.nix ./collections/utilities.nix ./collections/virtualization.nix diff --git a/archetypes/profiles/cuda/default.nix b/archetypes/profiles/cuda/default.nix index 14de560..b57b854 100644 --- a/archetypes/profiles/cuda/default.nix +++ b/archetypes/profiles/cuda/default.nix @@ -11,11 +11,9 @@ # Enable cudaSupport nixpkgs.config.cudaSupport = mkCuda true; - # Nvidia packages - environment.systemPackages = with pkgs; mkCuda [ - config.hardware.nvidia.package # nvidia-smi - nvtopPackages.nvidia - ]; + _archetypes.collections = { + nvidia.enable = mkCuda true; + }; # Enable nvidia graphics services.xserver.videoDrivers = mkCuda [ "nvidia" ]; # xserver.videoDrivers does not imply X |
