diff options
| author | Aargh Rai <aargh.rai+git@gmail.com> | 2025-10-27 11:46:45 +0530 |
|---|---|---|
| committer | Aargh Rai <aargh.rai+git@gmail.com> | 2025-10-27 11:46:45 +0530 |
| commit | b49553a6fd6a1376b61a57f3e414099e86e513cc (patch) | |
| tree | d314a6ce0e38e25ea532159bd70a36e1354431a8 | |
| parent | 84085c5ef88df567149c09a0c912da6d7254790a (diff) | |
nvidia configurable
| -rw-r--r-- | flake.nix | 9 | ||||
| -rw-r--r-- | nixos/configuration.nix | 7 |
2 files changed, 11 insertions, 5 deletions
@@ -15,6 +15,7 @@ system = "x86_64-linux"; username = "aargh"; hostname = "pegasus"; + nvidia = true; # This is where I have keep the dotfiles folder, replace it accordingly symlinkRoot = "/home/${username}/dotfiles"; @@ -30,7 +31,9 @@ in { nixosConfigurations.main = nixpkgs.lib.nixosSystem { inherit system; - specialArgs = { inherit inputs username hostname unstable symlinkRoot; }; + specialArgs = { + inherit inputs username hostname unstable symlinkRoot nvidia; + }; modules = [ ./nixos/configuration.nix @@ -38,7 +41,9 @@ { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; - home-manager.extraSpecialArgs = { inherit username unstable symlinkRoot; }; + home-manager.extraSpecialArgs = { + inherit username unstable symlinkRoot; + }; home-manager.backupFileExtension = "hm-backup"; home-manager.users.${username} = import ./home-manager/home.nix; } diff --git a/nixos/configuration.nix b/nixos/configuration.nix index d3a996a..351e549 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -1,4 +1,4 @@ -{ config, pkgs, username, hostname, ... }: +{ config, pkgs, username, hostname, nvidia, ... }: { imports = [ @@ -10,11 +10,12 @@ ./desktop-environment.nix ./environment.nix ./nvim.nix - ./nvidia.nix ./languages ./apps.nix ./tmux.nix - ]; + ] ++ (if nvidia then [ + ./nvidia.nix + ] else []); nix.settings = { cores = 6; |
