ollama
This commit is contained in:
		
							parent
							
								
									fc4f2e9779
								
							
						
					
					
						commit
						07c460e990
					
				
							
								
								
									
										34
									
								
								flake.lock
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										34
									
								
								flake.lock
									
									
									
										generated
									
									
									
								
							@ -242,11 +242,11 @@
 | 
				
			|||||||
        ]
 | 
					        ]
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      "locked": {
 | 
					      "locked": {
 | 
				
			||||||
        "lastModified": 1743387206,
 | 
					        "lastModified": 1743808813,
 | 
				
			||||||
        "narHash": "sha256-24N3NAuZZbYqZ39NgToZgHUw6M7xHrtrAm18kv0+2Wo=",
 | 
					        "narHash": "sha256-2lDQBOmlz9ggPxcS7/GvcVdzXMIiT+PpMao6FbLJSr0=",
 | 
				
			||||||
        "owner": "nix-community",
 | 
					        "owner": "nix-community",
 | 
				
			||||||
        "repo": "home-manager",
 | 
					        "repo": "home-manager",
 | 
				
			||||||
        "rev": "15c5f9d04fabd176f30286c8f52bbdb2c853a146",
 | 
					        "rev": "a9f8b3db211b4609ddd83683f9db89796c7f6ac6",
 | 
				
			||||||
        "type": "github"
 | 
					        "type": "github"
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      "original": {
 | 
					      "original": {
 | 
				
			||||||
@ -453,11 +453,11 @@
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    "nixpkgs": {
 | 
					    "nixpkgs": {
 | 
				
			||||||
      "locked": {
 | 
					      "locked": {
 | 
				
			||||||
        "lastModified": 1743501102,
 | 
					        "lastModified": 1743703532,
 | 
				
			||||||
        "narHash": "sha256-7PCBQ4aGVF8OrzMkzqtYSKyoQuU2jtpPi4lmABpe5X4=",
 | 
					        "narHash": "sha256-s1KLDALEeqy+ttrvqV3jx9mBZEvmthQErTVOAzbjHZs=",
 | 
				
			||||||
        "owner": "nixos",
 | 
					        "owner": "nixos",
 | 
				
			||||||
        "repo": "nixpkgs",
 | 
					        "repo": "nixpkgs",
 | 
				
			||||||
        "rev": "02f2af8c8a8c3b2c05028936a1e84daefa1171d4",
 | 
					        "rev": "bdb91860de2f719b57eef819b5617762f7120c70",
 | 
				
			||||||
        "type": "github"
 | 
					        "type": "github"
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      "original": {
 | 
					      "original": {
 | 
				
			||||||
@ -531,11 +531,11 @@
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    "nixpkgs_2": {
 | 
					    "nixpkgs_2": {
 | 
				
			||||||
      "locked": {
 | 
					      "locked": {
 | 
				
			||||||
        "lastModified": 1743448293,
 | 
					        "lastModified": 1743583204,
 | 
				
			||||||
        "narHash": "sha256-bmEPmSjJakAp/JojZRrUvNcDX2R5/nuX6bm+seVaGhs=",
 | 
					        "narHash": "sha256-F7n4+KOIfWrwoQjXrL2wD9RhFYLs2/GGe/MQY1sSdlE=",
 | 
				
			||||||
        "owner": "nixos",
 | 
					        "owner": "nixos",
 | 
				
			||||||
        "repo": "nixpkgs",
 | 
					        "repo": "nixpkgs",
 | 
				
			||||||
        "rev": "77b584d61ff80b4cef9245829a6f1dfad5afdfa3",
 | 
					        "rev": "2c8d3f48d33929642c1c12cd243df4cc7d2ce434",
 | 
				
			||||||
        "type": "github"
 | 
					        "type": "github"
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      "original": {
 | 
					      "original": {
 | 
				
			||||||
@ -548,8 +548,8 @@
 | 
				
			|||||||
    "nixpkgs_3": {
 | 
					    "nixpkgs_3": {
 | 
				
			||||||
      "locked": {
 | 
					      "locked": {
 | 
				
			||||||
        "lastModified": 0,
 | 
					        "lastModified": 0,
 | 
				
			||||||
        "narHash": "sha256-rBfc+H1dDBUQ2mgVITMGBPI1PGuCznf9rcWX/XIULyE=",
 | 
					        "narHash": "sha256-7PCBQ4aGVF8OrzMkzqtYSKyoQuU2jtpPi4lmABpe5X4=",
 | 
				
			||||||
        "path": "/nix/store/sr3gj4wcx3kwy0q5gcxl49ja733bqm7b-source",
 | 
					        "path": "/nix/store/yl6bc4g0axk5z4v0lsz8fzpxkc3yv1jl-source",
 | 
				
			||||||
        "type": "path"
 | 
					        "type": "path"
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      "original": {
 | 
					      "original": {
 | 
				
			||||||
@ -564,11 +564,11 @@
 | 
				
			|||||||
        "treefmt-nix": "treefmt-nix"
 | 
					        "treefmt-nix": "treefmt-nix"
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      "locked": {
 | 
					      "locked": {
 | 
				
			||||||
        "lastModified": 1743584017,
 | 
					        "lastModified": 1743848787,
 | 
				
			||||||
        "narHash": "sha256-pS+Uuq7yjEnBHWB/fI3ySBFJ6HUnUZTdwhN0ecZz1kc=",
 | 
					        "narHash": "sha256-LyE0Sr3mTb/ElWjueF+Lp6bL2FtJcltREd/qvBM0C04=",
 | 
				
			||||||
        "owner": "nix-community",
 | 
					        "owner": "nix-community",
 | 
				
			||||||
        "repo": "NUR",
 | 
					        "repo": "NUR",
 | 
				
			||||||
        "rev": "892b71bae4d42bc8066ecc9f76ccc91b587c6fbf",
 | 
					        "rev": "5ec7bc0851c41c90f2b62f976fcbf2a0f6f4a88c",
 | 
				
			||||||
        "type": "github"
 | 
					        "type": "github"
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      "original": {
 | 
					      "original": {
 | 
				
			||||||
@ -691,11 +691,11 @@
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    "unstable": {
 | 
					    "unstable": {
 | 
				
			||||||
      "locked": {
 | 
					      "locked": {
 | 
				
			||||||
        "lastModified": 1743568003,
 | 
					        "lastModified": 1743689281,
 | 
				
			||||||
        "narHash": "sha256-ZID5T65E8ruHqWRcdvZLsczWDOAWIE7om+vQOREwiX0=",
 | 
					        "narHash": "sha256-y7Hg5lwWhEOgflEHRfzSH96BOt26LaYfrYWzZ+VoVdg=",
 | 
				
			||||||
        "owner": "nixos",
 | 
					        "owner": "nixos",
 | 
				
			||||||
        "repo": "nixpkgs",
 | 
					        "repo": "nixpkgs",
 | 
				
			||||||
        "rev": "b7ba7f9f45c5cd0d8625e9e217c28f8eb6a19a76",
 | 
					        "rev": "2bfc080955153be0be56724be6fa5477b4eefabb",
 | 
				
			||||||
        "type": "github"
 | 
					        "type": "github"
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      "original": {
 | 
					      "original": {
 | 
				
			||||||
 | 
				
			|||||||
@ -83,6 +83,8 @@ in
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
      gregctl
 | 
					      gregctl
 | 
				
			||||||
#      wack
 | 
					#      wack
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					      unstable.ollama
 | 
				
			||||||
    ] ++ lib.optionals cfg.plus [
 | 
					    ] ++ lib.optionals cfg.plus [
 | 
				
			||||||
      ffmpeg-full
 | 
					      ffmpeg-full
 | 
				
			||||||
    ] ++ lib.optionals config.profiles.gui.enable [
 | 
					    ] ++ lib.optionals config.profiles.gui.enable [
 | 
				
			||||||
@ -335,6 +337,7 @@ in
 | 
				
			|||||||
    home.sessionVariables = {
 | 
					    home.sessionVariables = {
 | 
				
			||||||
      EDITOR = "hx";
 | 
					      EDITOR = "hx";
 | 
				
			||||||
      GRZEGORZ_DEFAULT_API_BASE = "https://georg.pvv.ntnu.no/api";
 | 
					      GRZEGORZ_DEFAULT_API_BASE = "https://georg.pvv.ntnu.no/api";
 | 
				
			||||||
 | 
					      OLLAMA_HOST="100.64.0.19";
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    xdg.mimeApps = {
 | 
					    xdg.mimeApps = {
 | 
				
			||||||
 | 
				
			|||||||
@ -9,9 +9,14 @@
 | 
				
			|||||||
    [ # Include the results of the hardware scan.
 | 
					    [ # Include the results of the hardware scan.
 | 
				
			||||||
      ./hardware-configuration.nix
 | 
					      ./hardware-configuration.nix
 | 
				
			||||||
#      ./wack.nix
 | 
					#      ./wack.nix
 | 
				
			||||||
 | 
					      ./ollama.nix
 | 
				
			||||||
      ../../common/builder.nix
 | 
					      ../../common/builder.nix
 | 
				
			||||||
    ];
 | 
					    ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  nixpkgs.config = {
 | 
				
			||||||
 | 
					    allowUnfree = true;
 | 
				
			||||||
 | 
					    rocmSupport = true;
 | 
				
			||||||
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # Use the systemd-boot EFI boot loader.
 | 
					  # Use the systemd-boot EFI boot loader.
 | 
				
			||||||
  boot.loader.efi.canTouchEfiVariables = true;
 | 
					  boot.loader.efi.canTouchEfiVariables = true;
 | 
				
			||||||
@ -65,12 +70,8 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  programs.steam = {
 | 
					  programs.steam = {
 | 
				
			||||||
    enable = true;
 | 
					    enable = true;
 | 
				
			||||||
    remotePlay.openFirewall = false; # Open ports in the firewall for Steam Remote Play
 | 
					    remotePlay.openFirewall = false;
 | 
				
			||||||
    dedicatedServer.openFirewall = false; # Open ports in the firewall for Source Dedicated Server
 | 
					    dedicatedServer.openFirewall = false;
 | 
				
			||||||
  };
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  nixpkgs.config = {
 | 
					 | 
				
			||||||
    allowUnfree = true;
 | 
					 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  services.tailscale.enable = true;
 | 
					  services.tailscale.enable = true;
 | 
				
			||||||
@ -129,10 +130,25 @@
 | 
				
			|||||||
  hardware.graphics.enable = true;
 | 
					  hardware.graphics.enable = true;
 | 
				
			||||||
  hardware.graphics.enable32Bit = true;
 | 
					  hardware.graphics.enable32Bit = true;
 | 
				
			||||||
  hardware.graphics.extraPackages = with pkgs; [
 | 
					  hardware.graphics.extraPackages = with pkgs; [
 | 
				
			||||||
    libva
 | 
					    libva rocmPackages.clr.icd
 | 
				
			||||||
  ];
 | 
					  ];
 | 
				
			||||||
  hardware.amdgpu.opencl.enable = true;
 | 
					  hardware.amdgpu.opencl.enable = true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  systemd.tmpfiles.rules = 
 | 
				
			||||||
 | 
					  let
 | 
				
			||||||
 | 
					    rocmEnv = pkgs.symlinkJoin {
 | 
				
			||||||
 | 
					      name = "rocm-combined";
 | 
				
			||||||
 | 
					      paths = with pkgs.rocmPackages; [
 | 
				
			||||||
 | 
					        rocblas
 | 
				
			||||||
 | 
					        hipblas
 | 
				
			||||||
 | 
					        clr
 | 
				
			||||||
 | 
					      ];
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					  in [
 | 
				
			||||||
 | 
					    "L+    /opt/rocm   -    -    -     -    ${rocmEnv}"
 | 
				
			||||||
 | 
					  ];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # Enable the X11 windowing system.
 | 
					  # Enable the X11 windowing system.
 | 
				
			||||||
  services.xserver.enable = true;
 | 
					  services.xserver.enable = true;
 | 
				
			||||||
  services.xserver.displayManager = {
 | 
					  services.xserver.displayManager = {
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										29
									
								
								hosts/asuka/soryu/ollama.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								hosts/asuka/soryu/ollama.nix
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,29 @@
 | 
				
			|||||||
 | 
					{ config, lib, pkgs, inputs, ... }:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					  services.ollama = {
 | 
				
			||||||
 | 
					    enable = true;
 | 
				
			||||||
 | 
					    acceleration = "rocm";
 | 
				
			||||||
 | 
					    package = inputs.unstable.legacyPackages.x86_64-linux.ollama;
 | 
				
			||||||
 | 
					    rocmOverrideGfx = "10.3.0";
 | 
				
			||||||
 | 
					    environmentVariables = {
 | 
				
			||||||
 | 
					      ROCR_VISIBLE_DEVICES = "GPU-5ecd14c0d670740b";
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					    host = "100.64.0.19";
 | 
				
			||||||
 | 
					    loadModels = [
 | 
				
			||||||
 | 
					      "gemma3:4b"
 | 
				
			||||||
 | 
					      "gemma3:12b"
 | 
				
			||||||
 | 
					      "gemma3:27b"
 | 
				
			||||||
 | 
					      "deepseek-r1:7b"
 | 
				
			||||||
 | 
					      "deepseek-r1:14b"
 | 
				
			||||||
 | 
					      "qwq:32b"
 | 
				
			||||||
 | 
					      "codestral:22b"
 | 
				
			||||||
 | 
					    ];
 | 
				
			||||||
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  systemd.services.ollama = {
 | 
				
			||||||
 | 
					    serviceConfig = {
 | 
				
			||||||
 | 
					      SupplementaryGroups = [ "video" ];
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					  };
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user