diff --git a/flake.lock b/flake.lock index e2f7288..517b832 100644 --- a/flake.lock +++ b/flake.lock @@ -147,11 +147,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1738603892, - "narHash": "sha256-RcFJjRJguv0dfvs3tf8bjClGd5kue9KWc5gnUBoi+bA=", + "lastModified": 1738852155, + "narHash": "sha256-K6kTeSafJ7Jz0o98OX8kov9P54kT7D/V5dgY8iXdXeI=", "owner": "kylekrein", "repo": "emacs-config", - "rev": "1f6d6bde186abc4b95c37dff6509fa284c1be200", + "rev": "d7c87a715cac6557b80844a5b4288ab7bbcf17a3", "type": "github" }, "original": { @@ -166,11 +166,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1738487447, - "narHash": "sha256-ijAfzHCr489cenoBBcmBn3huyeoitLx1f/9t2LaOwmE=", + "lastModified": 1738809425, + "narHash": "sha256-bGRsRKHhHBrG8EcJgsRAkFqVzMm2zIS+yns7rdCzvu8=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "a7f332f6e0813c9d0f53fe6539be1e7a65fff2e4", + "rev": "590d6ecac05c53ae8a87af317efa06f4a99ab116", "type": "github" }, "original": { @@ -1012,11 +1012,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1738277201, - "narHash": "sha256-6L+WXKCw5mqnUIExvqkD99pJQ41xgyCk6z/H9snClwk=", + "lastModified": 1738702386, + "narHash": "sha256-nJj8f78AYAxl/zqLiFGXn5Im1qjFKU8yBPKoWEeZN5M=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "666e1b3f09c267afd66addebe80fb05a5ef2b554", + "rev": "030ba1976b7c0e1a67d9716b17308ccdab5b381e", "type": "github" }, "original": { @@ -1028,11 +1028,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1738410390, - "narHash": "sha256-xvTo0Aw0+veek7hvEVLzErmJyQkEcRk6PSR4zsRQFEc=", + "lastModified": 1738680400, + "narHash": "sha256-ooLh+XW8jfa+91F1nhf9OF7qhuA/y1ChLx6lXDNeY5U=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3a228057f5b619feb3186e986dbe76278d707b6e", + "rev": "799ba5bffed04ced7067a91798353d360788b30d", "type": "github" }, "original": { @@ -1044,11 +1044,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1738410390, - "narHash": "sha256-xvTo0Aw0+veek7hvEVLzErmJyQkEcRk6PSR4zsRQFEc=", + "lastModified": 1738680400, + "narHash": "sha256-ooLh+XW8jfa+91F1nhf9OF7qhuA/y1ChLx6lXDNeY5U=", "owner": "nixos", "repo": "nixpkgs", - "rev": "3a228057f5b619feb3186e986dbe76278d707b6e", + "rev": "799ba5bffed04ced7067a91798353d360788b30d", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 00b80e0..a5331fc 100644 --- a/flake.nix +++ b/flake.nix @@ -121,6 +121,7 @@ config = { allowBroken = true; allowUnfree = true; + cudaSupport = true; }; }; modules = [ @@ -152,6 +153,7 @@ allowBroken = true; allowUnfree = true; allowUnsupportedSystem = true; + # rocmSupport = true; }; }; modules = [ diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 6695505..6a8b024 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -119,11 +119,11 @@ }; }; - qt = { - enable = true; - platformTheme = "qt5ct"; - style = "kvantum"; - }; + #qt = { + # enable = true; + # platformTheme = "qt5ct"; + # style = "kvantum"; + #}; # List packages installed in system profile. To search, run: # $ nix search wget diff --git a/nixos/hosts/kylekrein-homepc/default.nix b/nixos/hosts/kylekrein-homepc/default.nix index b83dd4c..6db13dd 100644 --- a/nixos/hosts/kylekrein-homepc/default.nix +++ b/nixos/hosts/kylekrein-homepc/default.nix @@ -24,6 +24,49 @@ #inputs.nix-gaming.packages.${pkgs.system}.star-citizen ]; + #LLMs + services.ollama = { + enable = true; + loadModels = [ "deepseek-r1:32b" ]; + acceleration = "cuda"; + home = "/persist/ollama"; + user = "ollama"; + group = "ollama"; + }; + services.open-webui.enable = true; + services.open-webui.openFirewall = true; + services.open-webui.host = "0.0.0.0"; + services.open-webui.stateDir = "/persist/open-webui"; + systemd.services.open-webui.serviceConfig.User = "ollama"; + systemd.services.open-webui.serviceConfig.Group = "ollama"; + systemd.services.open-webui.serviceConfig.DynamicUser = lib.mkForce false; + #Chat host + networking.firewall.allowedTCPPorts = [ 80 443 ]; + security.acme = { + acceptTerms = true; + defaults.email = "alex.lebedev2003@icloud.com"; + }; + services.nginx.enable = true; + services.nginx = { + # Use recommended settings + recommendedGzipSettings = true; + recommendedOptimisation = true; + recommendedProxySettings = true; + recommendedTlsSettings = true; + }; + services.nginx.virtualHosts = let + SSL = { + enableACME = true; + forceSSL = true; + }; in { + "chat.kylekrein.com" = (SSL // { + locations."/" = { + proxyPass = "http://127.0.0.1:8080/"; + proxyWebsockets = true; + }; + }); + }; + systemd.network.wait-online.enable = lib.mkForce false; } diff --git a/nixos/modules/hyprland/default.nix b/nixos/modules/hyprland/default.nix index 533b798..2cbc805 100644 --- a/nixos/modules/hyprland/default.nix +++ b/nixos/modules/hyprland/default.nix @@ -106,11 +106,11 @@ }; services.hypridle.enable = true; - qt = { - enable = true; - platformTheme = "qt5ct"; - style = "kvantum"; - }; + # qt = { + #enable = true; + #platformTheme = "qt5ct"; + #style = "kvantum"; + # }; } diff --git a/nixos/modules/impermanence/default.nix b/nixos/modules/impermanence/default.nix index 4ad2af6..d1a7a0a 100644 --- a/nixos/modules/impermanence/default.nix +++ b/nixos/modules/impermanence/default.nix @@ -37,6 +37,8 @@ in { }; systemd.tmpfiles.rules = [ "d /persist/home/ 0777 root root -" # /persist/home created, owned by root + "d /persist/ollama/ 0755 ollama ollama" + "d /persist/open-webui/ 0755 ollama ollama" #"d /persist/home/${username} 0700 ${username} users -" # /persist/home/ created, owned by that user #"d /persist/nixos-config 0700 ${username} users -" ];