5 Commits

Author SHA1 Message Date
Daniel Olsen
07c460e990 ollama 2025-04-05 16:49:01 +02:00
Daniel Olsen
fc4f2e9779 fixadoodeededemegadoodoo 2025-04-02 15:30:02 +02:00
Daniel Olsen
a9f3d0f090 configure builder 2025-04-02 15:21:49 +02:00
Daniel Olsen
5091a8f7a5 flake bumbp 2025-04-02 15:18:35 +02:00
Daniel Olsen
d3f69117be remote builder 2025-04-02 15:17:55 +02:00
6 changed files with 119 additions and 64 deletions

40
flake.lock generated
View File

@@ -242,11 +242,11 @@
]
},
"locked": {
"lastModified": 1742655702,
"narHash": "sha256-jbqlw4sPArFtNtA1s3kLg7/A4fzP4GLk9bGbtUJg0JQ=",
"lastModified": 1743808813,
"narHash": "sha256-2lDQBOmlz9ggPxcS7/GvcVdzXMIiT+PpMao6FbLJSr0=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "0948aeedc296f964140d9429223c7e4a0702a1ff",
"rev": "a9f8b3db211b4609ddd83683f9db89796c7f6ac6",
"type": "github"
},
"original": {
@@ -421,11 +421,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1742806253,
"narHash": "sha256-zvQ4GsCJT6MTOzPKLmlFyM+lxo0JGQ0cSFaZSACmWfY=",
"lastModified": 1743420942,
"narHash": "sha256-b/exDDQSLmENZZgbAEI3qi9yHkuXAXCPbormD8CSJXo=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "ecaa2d911e77c265c2a5bac8b583c40b0f151726",
"rev": "de6fc5551121c59c01e2a3d45b277a6d05077bc4",
"type": "github"
},
"original": {
@@ -453,11 +453,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1742751704,
"narHash": "sha256-rBfc+H1dDBUQ2mgVITMGBPI1PGuCznf9rcWX/XIULyE=",
"lastModified": 1743703532,
"narHash": "sha256-s1KLDALEeqy+ttrvqV3jx9mBZEvmthQErTVOAzbjHZs=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "f0946fa5f1fb876a9dc2e1850d9d3a4e3f914092",
"rev": "bdb91860de2f719b57eef819b5617762f7120c70",
"type": "github"
},
"original": {
@@ -531,11 +531,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1742889210,
"narHash": "sha256-hw63HnwnqU3ZQfsMclLhMvOezpM7RSB0dMAtD5/sOiw=",
"lastModified": 1743583204,
"narHash": "sha256-F7n4+KOIfWrwoQjXrL2wD9RhFYLs2/GGe/MQY1sSdlE=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "698214a32beb4f4c8e3942372c694f40848b360d",
"rev": "2c8d3f48d33929642c1c12cd243df4cc7d2ce434",
"type": "github"
},
"original": {
@@ -548,8 +548,8 @@
"nixpkgs_3": {
"locked": {
"lastModified": 0,
"narHash": "sha256-8XfURTDxOm6+33swQJu/hx6xw1Tznl8vJJN5HwVqckg=",
"path": "/nix/store/qjmsdak7fhqc7pi922i2mgm45f7af9h8-source",
"narHash": "sha256-7PCBQ4aGVF8OrzMkzqtYSKyoQuU2jtpPi4lmABpe5X4=",
"path": "/nix/store/yl6bc4g0axk5z4v0lsz8fzpxkc3yv1jl-source",
"type": "path"
},
"original": {
@@ -564,11 +564,11 @@
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1743025561,
"narHash": "sha256-wbszHA2bJaA9TSLkiU1Gqby4noRNhhWi9CNoFqxSPj0=",
"lastModified": 1743848787,
"narHash": "sha256-LyE0Sr3mTb/ElWjueF+Lp6bL2FtJcltREd/qvBM0C04=",
"owner": "nix-community",
"repo": "NUR",
"rev": "dcc6f70a7f8c69b50a266de40ca6228f01a50c88",
"rev": "5ec7bc0851c41c90f2b62f976fcbf2a0f6f4a88c",
"type": "github"
},
"original": {
@@ -691,11 +691,11 @@
},
"unstable": {
"locked": {
"lastModified": 1742923925,
"narHash": "sha256-biPjLws6FiBVUUDHEMFq5pUQL84Wf7PntPYdo3oKkFw=",
"lastModified": 1743689281,
"narHash": "sha256-y7Hg5lwWhEOgflEHRfzSH96BOt26LaYfrYWzZ+VoVdg=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "25d1b84f5c90632a623c48d83a2faf156451e6b1",
"rev": "2bfc080955153be0be56724be6fa5477b4eefabb",
"type": "github"
},
"original": {

View File

@@ -83,6 +83,8 @@ in
gregctl
# wack
#
unstable.ollama
] ++ lib.optionals cfg.plus [
ffmpeg-full
] ++ lib.optionals config.profiles.gui.enable [
@@ -335,6 +337,7 @@ in
home.sessionVariables = {
EDITOR = "hx";
GRZEGORZ_DEFAULT_API_BASE = "https://georg.pvv.ntnu.no/api";
OLLAMA_HOST="100.64.0.19";
};
xdg.mimeApps = {

View File

@@ -9,8 +9,14 @@
[ # Include the results of the hardware scan.
./hardware-configuration.nix
# ./wack.nix
./ollama.nix
../../common/builder.nix
];
nixpkgs.config = {
allowUnfree = true;
rocmSupport = true;
};
# Use the systemd-boot EFI boot loader.
boot.loader.efi.canTouchEfiVariables = true;
@@ -64,12 +70,8 @@
programs.steam = {
enable = true;
remotePlay.openFirewall = false; # Open ports in the firewall for Steam Remote Play
dedicatedServer.openFirewall = false; # Open ports in the firewall for Source Dedicated Server
};
nixpkgs.config = {
allowUnfree = true;
remotePlay.openFirewall = false;
dedicatedServer.openFirewall = false;
};
services.tailscale.enable = true;
@@ -128,10 +130,25 @@
hardware.graphics.enable = true;
hardware.graphics.enable32Bit = true;
hardware.graphics.extraPackages = with pkgs; [
libva
libva rocmPackages.clr.icd
];
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.
services.xserver.enable = true;
services.xserver.displayManager = {

View 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" ];
};
};
}

View File

@@ -205,46 +205,34 @@
nix.settings.trusted-users = [ "daniel" ];
nix.buildMachines = [
# { hostName = "bob.pvv.ntnu.no";
# system = "x86_64-linux";
# maxJobs = 12;
# supportedFeatures = [ "big-parallel" ];
# speedFactor = 129270;
# }
{ hostName = "bolle.pbsds.net";
{ hostName = "soryu";
system = "x86_64-linux";
maxJobs = 6;
speedFactor = 12857;
maxJobs = 16;
supportedFeatures = [ "big-parallel" ];
speedFactor = 66317;
}
{ hostName = "garp.pbsds.net";
system = "x86_64-linux";
maxJobs = 4;
# i7-6700
speedFactor = 8088;
}
{ hostName = "lilith";
system = "x86_64-linux";
# if the builder supports building for multiple architectures,
# replace the previous line by, e.g.,
# systems = ["x86_64-linux" "aarch64-linux"];
maxJobs = 6;
#speedFactor = 13199;
speedFactor = 6000;
supportedFeatures = [ ];
mandatoryFeatures = [ ];
}
{ hostName = "desktop";
system = "x86_64-linux";
maxJobs = 4;
#speedFactor = 8066;
speedFactor = 4000;
supportedFeatures = [ ];
mandatoryFeatures = [ ];
}
# { hostName = "sachiel";
# { hostName = "bob.pvv.ntnu.no";
# system = "x86_64-linux";
# maxJobs = 1;
# #speedfactor =
# maxJobs = 12;
# supportedFeatures = [ "big-parallel" ];
# speedFactor = 129270;
# }
# { hostName = "bolle.pbsds.net";
# system = "x86_64-linux";
# maxJobs = 6;
# speedFactor = 12857;
# }
# { hostName = "garp.pbsds.net";
# system = "x86_64-linux";
# maxJobs = 4;
# # i7-6700
# speedFactor = 8088;
# }
# { hostName = "lilith";
# system = "x86_64-linux";
# maxJobs = 6;
# #speedFactor = 13199;
# speedFactor = 6000;
# }
# {
# hostName = "isvegg.pvv.ntnu.no";

18
hosts/common/builder.nix Normal file
View File

@@ -0,0 +1,18 @@
{ config, lib, pkgs, ... }:
{
users.users.nixbuilder = {
group = "nixbuilder";
isSystemUser = true;
useDefaultShell = true;
openssh.authorizedKeys.keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDpGSDczzDOhTETCj+uB5e3/9QbOCaVW1knM+n1ey0n6LXH7uiPPmzuZiqfzmfbB1z4bjM2zpn3D6Et6zRCrBUjhTZqf/5GoNlvhVA6QYmBmBp98b8oY7juj5cmu55voxD0S5rC1mQMnWAAf8e8OPbkhs9Lt0XlOYdotLNIZQubzWqE2DK45g/h17ELJs+jkNXoalFjLvLXWzE/C+3pYoeNJVGHfVMTIwt7o64E6JXhxuYTYdSIuzd+BjntkSCXzcAzBFMRwkdlFVoBtLUMMcMQl39kcXv7lAQ8pv+8b1j1N9WuQVf1qEAcZguaimI1ifbXP5d841pZPApCj5KXectIEldfTrcwg8rZpd2UfYS/3XCcOuidBGprY7XsU/jz8wHbH68UjUrsLyaOMnG2ChYztnf63vm3gRs3Fc6FqTycpgYOPDeZBVTcMyPGgtiZvhnTeY20xFS5lK6M+dmgaDqH24kPLiwYSpUF2NK+Rg/2bZxvt/GaSr4U6fJGi3FCJOM= root@DanixLaptop"
];
};
users.groups.nixbuilder = {};
nix.settings.trusted-users = [ "nixbuilder" ];
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
}