diff options
| author | Aargh Rai <aargh.rai+git@gmail.com> | 2025-12-12 12:50:06 +0530 |
|---|---|---|
| committer | Aargh Rai <aargh.rai+git@gmail.com> | 2025-12-12 12:50:58 +0530 |
| commit | 42e48b718aa7757819c3c949c23f7fb638a54bdf (patch) | |
| tree | 8b8782a8b6fb1efc1083b27193965ef0b920de5b /nixos | |
| parent | 104b693339db54f3e3aee0ee8bfd33d0f47d5a44 (diff) | |
opt setup
;
Diffstat (limited to 'nixos')
| -rw-r--r-- | nixos/configuration.nix | 7 | ||||
| -rw-r--r-- | nixos/opt/default.nix | 9 | ||||
| -rw-r--r-- | nixos/opt/llm.nix | 7 | ||||
| -rw-r--r-- | nixos/opt/nvidia.nix (renamed from nixos/nvidia.nix) | 0 | ||||
| -rw-r--r-- | nixos/services.nix | 4 |
5 files changed, 19 insertions, 8 deletions
diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 351e549..0cdad27 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -1,4 +1,4 @@ -{ config, pkgs, username, hostname, nvidia, ... }: +{ config, pkgs, username, hostname, ... }: { imports = [ @@ -13,9 +13,8 @@ ./languages ./apps.nix ./tmux.nix - ] ++ (if nvidia then [ - ./nvidia.nix - ] else []); + ./opt + ]; nix.settings = { cores = 6; diff --git a/nixos/opt/default.nix b/nixos/opt/default.nix new file mode 100644 index 0000000..c9b6892 --- /dev/null +++ b/nixos/opt/default.nix @@ -0,0 +1,9 @@ +{ nvidia, llm, ... }: +{ + imports = + (if nvidia then [ + ./nvidia.nix + ] else []) ++ (if llm then [ + ./llm.nix + ] else []); +} diff --git a/nixos/opt/llm.nix b/nixos/opt/llm.nix new file mode 100644 index 0000000..a944d5c --- /dev/null +++ b/nixos/opt/llm.nix @@ -0,0 +1,7 @@ +{ config, pkgs, ... }: +{ + services.ollama = { + enable = true; + acceleration = "cuda"; + }; +} diff --git a/nixos/nvidia.nix b/nixos/opt/nvidia.nix index 63db5b2..63db5b2 100644 --- a/nixos/nvidia.nix +++ b/nixos/opt/nvidia.nix diff --git a/nixos/services.nix b/nixos/services.nix index 56e2fa4..b037ea8 100644 --- a/nixos/services.nix +++ b/nixos/services.nix @@ -14,10 +14,6 @@ alsa.support32Bit = true; pulse.enable = true; }; - services.ollama = { - enable = true; - acceleration = "cuda"; - }; services.power-profiles-daemon.enable = true; services.openssh.enable = true; services.flatpak.enable = true; |
