diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix index 0427f53..0904d76 100644 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -13,10 +13,20 @@ powerManagement.enable = true; nix = { - settings.experimental-features = [ "nix-command" "flakes" ]; 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=" + ]; + }; }; + networking = { hostName = "laptop"; networkmanager.enable = true; diff --git a/hosts/server/configuration.nix b/hosts/server/configuration.nix index 5b4f2e7..0caea1d 100644 --- a/hosts/server/configuration.nix +++ b/hosts/server/configuration.nix @@ -2,13 +2,23 @@ { imports = [ ./hardware-configuration.nix ./service.nix ]; - powerManagement.enable = true; + powerManagement.enable = false; system.autoUpgrade.enable = true; networking.networkmanager.enable = true; + boot.kernelParams = [ "intel_pstate=active" ]; nix = { - settings.experimental-features = [ "nix-command" "flakes" ]; 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=" + ]; + }; }; programs = { diff --git a/hosts/server/service.nix b/hosts/server/service.nix index e3a83f8..cc0336d 100644 --- a/hosts/server/service.nix +++ b/hosts/server/service.nix @@ -24,7 +24,17 @@ i2p = { enable = true; }; - ollama = { enable = true; }; + nix-serve = { + enable = true; + secretKeyFile = "/var/cache-priv-key.pem"; + }; + + ollama = { + enable = true; + package = pkgs.ollama.overrideAttrs (oldAttrs: { + NIX_CFLAGS_COMPILE = "${oldAttrs.NIX_CFLAGS_COMPILE or ""} -mavx2 -mfma -march=native -O3"; + }); + }; gitea = { enable = true; @@ -72,7 +82,7 @@ piper.servers."piperNix" = { enable = true; uri = "tcp://0.0.0.0:10200"; - voice = "en-us-ryan-medium"; + voice = "en-us-ryan-low"; }; faster-whisper.servers."whisperNix" = { enable = true; @@ -158,6 +168,10 @@ proxyWebsockets = true; }; }; + + "nix.dhilton.xyz" = { + locations."/".proxyPass = "http://127.0.0.1:5000"; + }; }; }; };