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 3818679..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="]; }; }; @@ -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/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; + }; } diff --git a/hosts/server/service.nix b/hosts/server/service.nix index a2f2a71..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 = { @@ -31,6 +33,15 @@ i2p = {enable = true;}; + cockpit = { + enable = true; + allowed-origins = ["https://pit.dhilton.xyz"]; + }; + + pulseaudio = { + enable = true; + }; + nix-serve = { enable = true; secretKeyFile = "/var/cache-priv-key.pem"; @@ -173,6 +184,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"; }; 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" ''; }); })