aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAargh Rai <aargh.rai+git@gmail.com>2025-12-12 12:50:06 +0530
committerAargh Rai <aargh.rai+git@gmail.com>2025-12-12 12:50:58 +0530
commit42e48b718aa7757819c3c949c23f7fb638a54bdf (patch)
tree8b8782a8b6fb1efc1083b27193965ef0b920de5b
parent104b693339db54f3e3aee0ee8bfd33d0f47d5a44 (diff)
opt setup
;
-rw-r--r--flake.nix3
-rw-r--r--nixos/configuration.nix7
-rw-r--r--nixos/opt/default.nix9
-rw-r--r--nixos/opt/llm.nix7
-rw-r--r--nixos/opt/nvidia.nix (renamed from nixos/nvidia.nix)0
-rw-r--r--nixos/services.nix4
6 files changed, 21 insertions, 9 deletions
diff --git a/flake.nix b/flake.nix
index 52c2a64..632ce70 100644
--- a/flake.nix
+++ b/flake.nix
@@ -26,6 +26,7 @@
username = "aargh";
hostname = "pegasus";
nvidia = true;
+ llm = true;
# This is where I have keep the dotfiles folder, replace it accordingly
symlinkRoot = "/home/${username}/dotfiles";
@@ -42,7 +43,7 @@
nixosConfigurations.main = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {
- inherit quickshell inputs username hostname unstable symlinkRoot nvidia;
+ inherit quickshell inputs username hostname unstable symlinkRoot nvidia llm;
};
modules = [
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;