From 80c6d1bfe25cd8e88802c4e240bb56db4ec4996e Mon Sep 17 00:00:00 2001 From: k Date: Sun, 13 Jul 2025 10:29:55 -0400 Subject: [PATCH 1/4] tweeked ollama --- overlays/ollama.nix | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/overlays/ollama.nix b/overlays/ollama.nix index 8f9030b..008b022 100644 --- a/overlays/ollama.nix +++ b/overlays/ollama.nix @@ -29,16 +29,19 @@ postInstall = (oldAttrs.postInstall or "") + '' - mkdir -p "$out/bin" - cat << EOF > "$out/bin/ollama-wrapped" - #!/bin/sh - export LD_LIBRARY_PATH="${prev.intel-compute-runtime.drivers}/lib" - export OLLAMA_INTEL_GPU=1 - exec "$out/bin/ollama-base" "\$@" - EOF - chmod +x "$out/bin/ollama-wrapped" - mv $out/bin/ollama $out/bin/ollama-base - ln -s "$out/bin/ollama-wrapped" "$out/bin/ollama" + mkdir -p "$out/bin" + cat << EOF > "$out/bin/ollama-wrapped" + #!/bin/sh + export LD_LIBRARY_PATH="${prev.intel-compute-runtime.drivers}/lib" + export OLLAMA_INTEL_GPU=1 + export OLLAMA_NUM_GPU=999 + export ZES_ENABLE_SYSMAN=1 + export SYCL_CACHE_PERSISTENT=1 + exec "$out/bin/ollama-base" "\$@" + EOF + chmod +x "$out/bin/ollama-wrapped" + mv $out/bin/ollama $out/bin/ollama-base + ln -s "$out/bin/ollama-wrapped" "$out/bin/ollama" ''; }); }) From 70cc2587aa544f83dd95b2384cf54b2dbc8f4e93 Mon Sep 17 00:00:00 2001 From: k Date: Sun, 13 Jul 2025 10:32:20 -0400 Subject: [PATCH 2/4] added cockpit --- hosts/server/service.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/hosts/server/service.nix b/hosts/server/service.nix index a2f2a71..4611df0 100644 --- a/hosts/server/service.nix +++ b/hosts/server/service.nix @@ -31,6 +31,10 @@ i2p = {enable = true;}; + cockpit = { + enable = true; + allowed-origins = ["https://pit.dhilton.xyz"]; + }; nix-serve = { enable = true; secretKeyFile = "/var/cache-priv-key.pem"; @@ -173,6 +177,15 @@ }; }; + "pit.dhilton.xyz" = { + forceSSL = true; + enableACME = true; + locations."/" = { + proxyPass = "http://127.0.0.1:9090"; + proxyWebsockets = true; + }; + }; + "nix.dhilton.xyz" = { locations."/".proxyPass = "http://127.0.0.1:5000"; }; From fd2e474229219eea1d8136ef9a6a1a6127c839d6 Mon Sep 17 00:00:00 2001 From: k Date: Sun, 13 Jul 2025 10:33:52 -0400 Subject: [PATCH 3/4] added kodi --- hosts/server/configuration.nix | 10 +++++++++- hosts/server/service.nix | 15 +++++++++++---- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/hosts/server/configuration.nix b/hosts/server/configuration.nix index 3818679..31a657c 100644 --- a/hosts/server/configuration.nix +++ b/hosts/server/configuration.nix @@ -50,7 +50,15 @@ home-manager = {users = {"k" = import ./home.nix;};}; - environment.systemPackages = with pkgs; [microcodeIntel]; + environment.systemPackages = with pkgs; [ + microcodeIntel + firefox + (pkgs.kodi.withPackages (kodiPkgs: + with kodiPkgs; [ + jellyfin + youtube + ])) + ]; hardware.bluetooth.enable = true; hardware.bluetooth.powerOnBoot = true; diff --git a/hosts/server/service.nix b/hosts/server/service.nix index 4611df0..04f6f54 100644 --- a/hosts/server/service.nix +++ b/hosts/server/service.nix @@ -3,10 +3,12 @@ lib, ... }: { - networking.firewall = { - enable = true; - allowedTCPPorts = [80 443 22]; - allowedUDPPorts = []; + networking = { + firewall = { + enable = true; + allowedTCPPorts = [80 443 22 25565 26615 8080]; + allowedUDPPorts = [26615 8080 1900]; + }; }; security.acme = { @@ -35,6 +37,11 @@ enable = true; allowed-origins = ["https://pit.dhilton.xyz"]; }; + + pulseaudio = { + enable = true; + }; + nix-serve = { enable = true; secretKeyFile = "/var/cache-priv-key.pem"; From 6c6af12ef6905ee7b968b664f0bc3dd5a6ec780f Mon Sep 17 00:00:00 2001 From: k Date: Sun, 13 Jul 2025 10:35:02 -0400 Subject: [PATCH 4/4] clean up --- hosts/laptop/configuration.nix | 1 - hosts/server/configuration.nix | 4 ++-- hosts/server/home.nix | 5 ++++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix index eb22c7f..a878c21 100644 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -97,7 +97,6 @@ thermald.enable = true; }; - stylix = { enable = true; autoEnable = true; diff --git a/hosts/server/configuration.nix b/hosts/server/configuration.nix index 31a657c..e01d7b5 100644 --- a/hosts/server/configuration.nix +++ b/hosts/server/configuration.nix @@ -13,8 +13,8 @@ gc.automatic = true; settings = { experimental-features = ["nix-command" "flakes"]; - substituters = ["http://nix.dhilton.xyz/" "https://cache.nixos.org/"]; - trusted-public-keys = ["nix.dhilton.xyz:MOW060dF1A0/UXmPZBue9KMxCO13PHYFwx1X9hcdYZ4="]; + #substituters = ["http://nix.dhilton.xyz/" "https://cache.nixos.org/"]; + #trusted-public-keys = ["nix.dhilton.xyz:MOW060dF1A0/UXmPZBue9KMxCO13PHYFwx1X9hcdYZ4="]; }; }; diff --git a/hosts/server/home.nix b/hosts/server/home.nix index 3b1a21b..9d080c6 100644 --- a/hosts/server/home.nix +++ b/hosts/server/home.nix @@ -5,5 +5,8 @@ ... }: { imports = [../home/home_common.nix]; - home = {packages = with pkgs; [docker docker-compose neovim];}; + home = {packages = with pkgs; [docker docker-compose neovim waypipe];}; + services = { + syncthing.enable = true; + }; }