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

View File

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

View File

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

View File

@@ -1,7 +1,6 @@
{
imports = [
./packages.nix
# ./ollama.nix
../common/brave.nix
../common/direnv.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, ... }:
{
fonts.fontconfig.enable = true;
home.packages = [
@@ -9,6 +10,8 @@
pkgs.keepassxc
pkgs.telegram-desktop
pkgs.element-desktop
pkgs.tidal-hifi
pkgs.tree
pkgs.htop
@@ -16,11 +19,15 @@
pkgs.wget
pkgs.unzip
pkgs.open-webui
pkgs.librechat
pkgs.feather
pkgs.firefox
pkgs.ranger
pkgs.zathura
pkgs.nerd-fonts.fira-code
pkgs.fira-code

View File

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

View File

@@ -1,8 +1,11 @@
{ config, pkgs, ... }:
{ pkgs, ... }:
{
services.displayManager.gdm.enable = true;
services.desktopManager.gnome.enable = true;
services.xserver = {
displayManager.gdm.enable = true;
desktopManager.gnome.enable = true;
};
# To disable installing GNOME's suite of applications
# 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.oci-containers.backend = "docker";
}