setup local llms with websearch

This commit is contained in:
2025-11-06 12:00:23 +01:00
parent 2cbbbddcab
commit 9ba39dbff4
10 changed files with 64 additions and 31 deletions

15
flake.lock generated
View File

@@ -7,31 +7,32 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1762041416, "lastModified": 1758463745,
"narHash": "sha256-rmJKABRXnhFjjI6RB/MnEvLTQa569zu684Th9y6UlOI=", "narHash": "sha256-uhzsV0Q0I9j2y/rfweWeGif5AWe0MGrgZ/3TjpDYdGA=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "c0016dd14773f4ca0b467b74c7cdcc501570df4b", "rev": "3b955f5f0a942f9f60cdc9cacb7844335d0f21c3",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"ref": "release-25.05",
"repo": "home-manager", "repo": "home-manager",
"type": "github" "type": "github"
} }
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1761907660, "lastModified": 1761999846,
"narHash": "sha256-kJ8lIZsiPOmbkJypG+B5sReDXSD1KGu2VEPNqhRa/ew=", "narHash": "sha256-IYlYnp4O4dzEpL77BD/lj5NnJy2J8qbHkNSFiPBCbqo=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "2fb006b87f04c4d3bdf08cfdbc7fab9c13d94a15", "rev": "3de8f8d73e35724bf9abef41f1bdbedda1e14a31",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-unstable", "ref": "nixos-25.05",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }

View File

@@ -2,10 +2,10 @@
description = "NixOS + Home Manager config"; description = "NixOS + Home Manager config";
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
home-manager = { home-manager = {
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager/release-25.05";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
@@ -13,7 +13,6 @@
outputs = inputs@{ self, nixpkgs, home-manager, ... }: { outputs = inputs@{ self, nixpkgs, home-manager, ... }: {
nixosConfigurations = { nixosConfigurations = {
segfault-machine = nixpkgs.lib.nixosSystem { segfault-machine = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
@@ -26,6 +25,8 @@
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.users.lukas.imports = [ home-manager.users.lukas.imports = [
./home/lukas/laptop/default.nix ./home/lukas/laptop/default.nix
]; ];
@@ -42,6 +43,7 @@
modules = [ modules = [
./hosts/segfault-tower/configuration.nix ./hosts/segfault-tower/configuration.nix
home-manager.nixosModules.home-manager { home-manager.nixosModules.home-manager {
home-manager.backupFileExtension = "backup"; home-manager.backupFileExtension = "backup";
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;

View File

@@ -12,13 +12,7 @@ in {
userName= "Lukas"; userName= "Lukas";
userEmail = "mail@lukas.contact"; userEmail = "mail@lukas.contact";
settings = { extraConfig = {
user = {
mail = "mail@lukas.contact";
name = "Lukas";
};
commit.gpgsign = true; commit.gpgsign = true;
gpg.format = "ssh"; gpg.format = "ssh";
gpg.ssh.allowedSignersFile = "~/.ssh/allowed_signers"; gpg.ssh.allowedSignersFile = "~/.ssh/allowed_signers";

View File

@@ -1,7 +1,6 @@
{ {
imports = [ imports = [
./packages.nix ./packages.nix
# ./ollama.nix
../common/brave.nix ../common/brave.nix
../common/direnv.nix ../common/direnv.nix
../common/emacs.nix ../common/emacs.nix

View File

@@ -1,8 +0,0 @@
{
services.ollama = {
enable = true;
acceleration = "cuda";
# Optional: preload models, see https://ollama.com/library
# loadModels = [ "qwen3:30b" "gpt-oss:20b" "deepseek-r1:32b" "gemma3:27b"];
};
}

View File

@@ -1,6 +1,7 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
fonts.fontconfig.enable = true; fonts.fontconfig.enable = true;
home.packages = [ home.packages = [
@@ -9,6 +10,8 @@
pkgs.keepassxc pkgs.keepassxc
pkgs.telegram-desktop pkgs.telegram-desktop
pkgs.element-desktop pkgs.element-desktop
pkgs.tidal-hifi
pkgs.tree pkgs.tree
pkgs.htop pkgs.htop
@@ -16,11 +19,15 @@
pkgs.wget pkgs.wget
pkgs.unzip pkgs.unzip
pkgs.open-webui
pkgs.librechat
pkgs.feather pkgs.feather
pkgs.firefox pkgs.firefox
pkgs.ranger pkgs.ranger
pkgs.zathura
pkgs.nerd-fonts.fira-code pkgs.nerd-fonts.fira-code
pkgs.fira-code pkgs.fira-code

View File

@@ -13,7 +13,6 @@
../../modules/networking/networkmanager.nix ../../modules/networking/networkmanager.nix
../../modules/networking/bluetooth.nix ../../modules/networking/bluetooth.nix
../../modules/system/locale.nix ../../modules/system/locale.nix
# ../../modules/system/suspend-and-hibernate.nix
../../modules/system/nvidia.nix ../../modules/system/nvidia.nix
../../modules/system/audio.nix ../../modules/system/audio.nix
../../modules/system/printing.nix ../../modules/system/printing.nix
@@ -21,6 +20,7 @@
../../modules/system/gpg.nix ../../modules/system/gpg.nix
../../modules/system/virtualbox.nix ../../modules/system/virtualbox.nix
../../modules/system/mullvad.nix ../../modules/system/mullvad.nix
../../modules/services/ollama.nix
]; ];
# Bootloader. # Bootloader.
@@ -40,6 +40,6 @@
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
# Version festlegen # Version festlegen
system.stateVersion = "25.11"; system.stateVersion = "25.05";
nix.settings.experimental-features = [ "nix-command" "flakes" ]; nix.settings.experimental-features = [ "nix-command" "flakes" ];
} }

View File

@@ -1,8 +1,11 @@
{ config, pkgs, ... }: { pkgs, ... }:
{ {
services.displayManager.gdm.enable = true; services.xserver = {
services.desktopManager.gnome.enable = true; displayManager.gdm.enable = true;
desktopManager.gnome.enable = true;
};
# To disable installing GNOME's suite of applications # To disable installing GNOME's suite of applications
# and only be left with GNOME shell. # and only be left with GNOME shell.

View File

@@ -0,0 +1,34 @@
{
services.ollama = {
enable = true;
acceleration = "cuda";
};
systemd.services.ollama.serviceConfig = {
Environment = [ "OLLAMA_HOST=0.0.0.0:11434" ];
};
services.open-webui = {
enable = true;
port = 8081;
environment = {
ANONYMIZED_TELEMETRY = "False";
DO_NOT_TRACK = "True";
SCARF_NO_ANALYTICS = "True";
OLLAMA_API_BASE_URL = "http://127.0.0.1:11434/api";
OLLAMA_BASE_URL = "http://127.0.0.1:11434";
};
};
services.searx = {
enable = true;
redisCreateLocally = true;
settings.server = {
bind_address = "::1";
port = 1111;
secret_key = "my ultra secret key";
};
settings.search.formats = ["html" "json"];
};
}

View File

@@ -1,3 +1,4 @@
{ {
virtualisation.docker.enable = true; virtualisation.docker.enable = true;
virtualisation.oci-containers.backend = "docker";
} }