Compare commits
4 Commits
a9a6518dee
...
6c6af12ef6
| Author | SHA1 | Date | |
|---|---|---|---|
| 6c6af12ef6 | |||
| fd2e474229 | |||
| 70cc2587aa | |||
| 80c6d1bfe2 |
@ -97,7 +97,6 @@
|
|||||||
thermald.enable = true;
|
thermald.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
stylix = {
|
stylix = {
|
||||||
enable = true;
|
enable = true;
|
||||||
autoEnable = true;
|
autoEnable = true;
|
||||||
|
|||||||
@ -13,8 +13,8 @@
|
|||||||
gc.automatic = true;
|
gc.automatic = true;
|
||||||
settings = {
|
settings = {
|
||||||
experimental-features = ["nix-command" "flakes"];
|
experimental-features = ["nix-command" "flakes"];
|
||||||
substituters = ["http://nix.dhilton.xyz/" "https://cache.nixos.org/"];
|
#substituters = ["http://nix.dhilton.xyz/" "https://cache.nixos.org/"];
|
||||||
trusted-public-keys = ["nix.dhilton.xyz:MOW060dF1A0/UXmPZBue9KMxCO13PHYFwx1X9hcdYZ4="];
|
#trusted-public-keys = ["nix.dhilton.xyz:MOW060dF1A0/UXmPZBue9KMxCO13PHYFwx1X9hcdYZ4="];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -50,7 +50,15 @@
|
|||||||
|
|
||||||
home-manager = {users = {"k" = import ./home.nix;};};
|
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.enable = true;
|
||||||
hardware.bluetooth.powerOnBoot = true;
|
hardware.bluetooth.powerOnBoot = true;
|
||||||
|
|||||||
@ -5,5 +5,8 @@
|
|||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
imports = [../home/home_common.nix];
|
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;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,10 +3,12 @@
|
|||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
networking.firewall = {
|
networking = {
|
||||||
enable = true;
|
firewall = {
|
||||||
allowedTCPPorts = [80 443 22];
|
enable = true;
|
||||||
allowedUDPPorts = [];
|
allowedTCPPorts = [80 443 22 25565 26615 8080];
|
||||||
|
allowedUDPPorts = [26615 8080 1900];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
security.acme = {
|
security.acme = {
|
||||||
@ -31,6 +33,15 @@
|
|||||||
|
|
||||||
i2p = {enable = true;};
|
i2p = {enable = true;};
|
||||||
|
|
||||||
|
cockpit = {
|
||||||
|
enable = true;
|
||||||
|
allowed-origins = ["https://pit.dhilton.xyz"];
|
||||||
|
};
|
||||||
|
|
||||||
|
pulseaudio = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
nix-serve = {
|
nix-serve = {
|
||||||
enable = true;
|
enable = true;
|
||||||
secretKeyFile = "/var/cache-priv-key.pem";
|
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" = {
|
"nix.dhilton.xyz" = {
|
||||||
locations."/".proxyPass = "http://127.0.0.1:5000";
|
locations."/".proxyPass = "http://127.0.0.1:5000";
|
||||||
};
|
};
|
||||||
|
|||||||
@ -29,16 +29,19 @@
|
|||||||
postInstall =
|
postInstall =
|
||||||
(oldAttrs.postInstall or "")
|
(oldAttrs.postInstall or "")
|
||||||
+ ''
|
+ ''
|
||||||
mkdir -p "$out/bin"
|
mkdir -p "$out/bin"
|
||||||
cat << EOF > "$out/bin/ollama-wrapped"
|
cat << EOF > "$out/bin/ollama-wrapped"
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
export LD_LIBRARY_PATH="${prev.intel-compute-runtime.drivers}/lib"
|
export LD_LIBRARY_PATH="${prev.intel-compute-runtime.drivers}/lib"
|
||||||
export OLLAMA_INTEL_GPU=1
|
export OLLAMA_INTEL_GPU=1
|
||||||
exec "$out/bin/ollama-base" "\$@"
|
export OLLAMA_NUM_GPU=999
|
||||||
EOF
|
export ZES_ENABLE_SYSMAN=1
|
||||||
chmod +x "$out/bin/ollama-wrapped"
|
export SYCL_CACHE_PERSISTENT=1
|
||||||
mv $out/bin/ollama $out/bin/ollama-base
|
exec "$out/bin/ollama-base" "\$@"
|
||||||
ln -s "$out/bin/ollama-wrapped" "$out/bin/ollama"
|
EOF
|
||||||
|
chmod +x "$out/bin/ollama-wrapped"
|
||||||
|
mv $out/bin/ollama $out/bin/ollama-base
|
||||||
|
ln -s "$out/bin/ollama-wrapped" "$out/bin/ollama"
|
||||||
'';
|
'';
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user