Compare commits

..

No commits in common. "3b28f09e04428dd9e3aec32dff5616c9e05b9636" and "36c8e99d7efcf827b6fb7ba86778d6a21dedef29" have entirely different histories.

10 changed files with 87 additions and 38 deletions

24
flake.lock generated
View File

@ -319,16 +319,16 @@
]
},
"locked": {
"lastModified": 1731880681,
"narHash": "sha256-FmYTkIyPBUxSWgA7DPIVTsCCMvSSbs56yOtHpLNSnKg=",
"lastModified": 1726989464,
"narHash": "sha256-Vl+WVTJwutXkimwGprnEtXc/s/s8sMuXzqXaspIGlwM=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "aecd341dfead1c3ef7a3c15468ecd71e8343b7c6",
"rev": "2f23fa308a7c067e52dfcc30a0758f47043ec176",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-24.11",
"ref": "release-24.05",
"repo": "home-manager",
"type": "github"
}
@ -352,7 +352,7 @@
"local-unstable": {
"locked": {
"lastModified": 0,
"narHash": "sha256-uewgkTWbDOpOP+wEA3f03XEKsPHsJi0iDqBGQnxWQo0=",
"narHash": "sha256-9xAEU7FSzN5kEu+LGYSQwoYySauT7XmyxCTfkdS6eBs=",
"path": "/home/giulio/dev/nixpkgs",
"type": "path"
},
@ -481,11 +481,11 @@
},
"nixos-unstable": {
"locked": {
"lastModified": 1731955258,
"narHash": "sha256-3p5dNocIBvqugZyMLnT7gjE9DF2WV5kVbVlLTbYI+eQ=",
"lastModified": 1731762464,
"narHash": "sha256-kr+46IEV/3hqO/IlXvucFeNpVkrNRvIhHFnEv/k381s=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "2b552e98ea099d6b7d1a809e32a478f1f6258dd1",
"rev": "0361bb03c0bad5f32e7d3010da3921cba20b3126",
"type": "github"
},
"original": {
@ -497,16 +497,16 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1731951205,
"narHash": "sha256-9YhDFPy6K7vUA9NVvlIrV0dFxrARqKgTFhst94yblkM=",
"lastModified": 1731737433,
"narHash": "sha256-pT/lio7wmcXBZreoQ3xsPYd2wGvlFNKnottDYpwJSfs=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "0054a256665f0df8d61b4df921280d6994f2c284",
"rev": "3c1c28c6d6691914707719d33f2e88b0feb7c58d",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "release-24.11",
"ref": "release-24.05",
"repo": "nixpkgs",
"type": "github"
}

View File

@ -1,11 +1,11 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/release-24.11";
nixpkgs.url = "github:NixOS/nixpkgs/release-24.05";
nixos-unstable.url = "github:NixOS/nixpkgs/master";
local-unstable.url = "path:///home/giulio/dev/nixpkgs";
teslamate-flake.url = "github:teslamate-org/teslamate/v1.31.1";
home-manager = {
url = "github:nix-community/home-manager/release-24.11";
url = "github:nix-community/home-manager/release-24.05";
inputs.nixpkgs.follows = "nixpkgs";
};
nvidia-patch = {

View File

@ -28,11 +28,20 @@ in
./dns.nix
# ./minecraft.nix
./prowlarr.nix
./redlib.nix
./libreddit.nix
# ./invidious.nix
# ./lidarr.nix
./navidrome.nix
./jellyfin.nix
# ./prosody.nix
# ./deluge.nix
#./calibre.nix
./docker.nix
# ./keycloak.nix
# ./runas.nix
./tailscale.nix
# ./searx.nix
# ./plex.nix
./headscale.nix
./llm.nix
# ./photoprism.nix
@ -129,6 +138,7 @@ in
hardware.opengl = {
enable = true;
extraPackages = with pkgs; [ vaapiVdpau ];
driSupport = true;
};
services = {

View File

@ -29,20 +29,17 @@ in
settings = {
server_url = "https://${domain}";
# log.level = "debug";
dns = {
log.level = "debug";
dns_config = {
magic_dns = false;
# base_domain = domain;
base_domain = domain;
override_local_dns = true;
global = [
config.architect.networks.tailscale.devices.architect.address
];
nameservers.global = [
nameservers = [
config.architect.networks.tailscale.devices.architect.address
];
};
logtail.enabled = false;
prefixes.v4 = config.architect.networks.tailscale.net;
ip_prefixes = [ config.architect.networks.tailscale.net ];
noise.private_key_path = "/var/lib/headscale/noise_private.key";
};
};

View File

@ -4,7 +4,7 @@ let
domain = "reddit.giugl.io";
in
{
systemd.services.redlib.environment = {
systemd.services.libreddit.environment = {
REDLIB_ROBOTS_DISABLE_INDEXING = "on";
REDLIB_DEFAULT_THEME = "dracula";
REDLIB_DEFAULT_SHOW_NSFW = "on";
@ -13,7 +13,7 @@ in
REDLIB_DEFAULT_HIDE_HLS_NOTIFICATION = "on";
};
services.redlib = {
services.libreddit = {
enable = true;
port = 9090;
package = pkgs.unstablePkgs.redlib;
@ -22,7 +22,7 @@ in
architect.vhost.${domain} = {
dnsInterfaces = [ "lan" "tailscale" ];
locations."/" = {
port = config.services.redlib.port;
port = config.services.libreddit.port;
allowWAN = true;
};
};

View File

@ -1,9 +1,11 @@
{ pkgs, ... }:
let
frontendDomain = "pino.giugl.io";
backendDomain = "ollama.giugl.io";
ollamaHost = "127.0.0.1";
frontendPort = 3030;
ollamaPort = 11434;
listenAddress = "127.0.0.1:${toString ollamaPort}";
ollamaPkg = pkgs.unstablePkgs.ollama;
in
{
@ -12,23 +14,37 @@ in
};
services.ollama = {
enable = true;
inherit listenAddress;
package = ollamaPkg;
host = ollamaHost;
port = ollamaPort;
enable = true;
acceleration = "cuda";
package = ollamaPkg;
environmentVariables = {
# OLLAMA_ORIGINS = "10.0.0.0/24";
OLLAMA_FLASH_ATTENTION = "1";
OLLAMA_NUM_PARALLEL = "2";
};
};
# architect.vhost.${frontendDomain} = {
# dnsInterfaces = [ "tailscale" "lan" ];
# locations."/" = {
# host = "127.0.0.1";
# port = frontendPort;
# allowLan = true;
# allowWAN = true;
# extraConfig = ''
# proxy_read_timeout 600s;
# '';
# };
# };
architect.vhost.${backendDomain} = {
dnsInterfaces = [ "tailscale" "lan" ];
locations."/" = {
host = ollamaHost;
host = "127.0.0.1";
port = ollamaPort;
allowLan = true;
allowWAN = true;
@ -40,4 +56,28 @@ in
'';
};
};
# virtualisation.oci-containers = {
# containers = {
# ollama-webui = {
# image = "ghcr.io/open-webui/open-webui:main";
# autoStart = true;
# ports = [
# "127.0.0.1:${toString frontendPort}:8080"
# ];
# environment = {
# OLLAMA_BASE_URL = "https://${backendDomain}";
# };
# extraOptions = [
# "--pull=always"
# ];
# volumes = [
# "/var/lib/ollama-webui:/app/backend/data"
# ];
# };
# };
# };
}

View File

@ -30,7 +30,7 @@ let
executable = true;
destination = "/bin/resolution.sh";
};
sunshinePkg = (pkgs.localPkgs.sunshine.override { cudaSupport = true; cudaPackages = pkgs.cudaPackages_12_3; boost = pkgs.boost186; });
sunshinePkg = (pkgs.localPkgs.sunshine.override { cudaSupport = true; cudaPackages = pkgs.cudaPackages; boost = pkgs.unstablePkgs.boost186; });
in
{
boot.kernelModules = [ "uinput" ];
@ -38,7 +38,7 @@ in
environment.systemPackages = [ pkgs.unstablePkgs.gamemode ];
hardware = {
pulseaudio.enable = false;
pulseaudio.enable = true;
nvidia = {
modesetting.enable = true;
@ -203,6 +203,8 @@ in
};
};
sound.enable = true;
systemd.targets = {
sleep.enable = false;
suspend.enable = false;

View File

@ -37,7 +37,7 @@
useGlobalPkgs = true;
};
system.stateVersion = "24.11";
system.stateVersion = "24.05";
}
home-manager.nixosModules.home-manager

View File

@ -23,6 +23,6 @@
]
++ lib.optional (!pkgs.stdenv.isDarwin) pastebinit;
stateVersion = "24.11";
stateVersion = "24.05";
};
}

View File

@ -11,7 +11,7 @@ in
oh-my-zsh = {
enable = true;
plugins = [ "git" "sudo" "docker" "docker-compose" "systemd" ];
plugins = [ "git" "sudo" "docker" "docker-compose" "adb" "systemd" ];
theme = "bira";
};
autosuggestion.enable = false;