Compare commits

..

7 Commits

Author SHA1 Message Date
Giulio De Pasquale
3b28f09e04 Merge branch 'master' of ssh://git.giugl.io/peperunas/nixos 2024-11-18 20:02:51 +00:00
Giulio De Pasquale
b4e03a9dc2 feat: bump to 24.11 2024-11-18 19:58:44 +00:00
Giulio De Pasquale
9abf353f88 fix(nix): update stateVersion and remove adb plugin
- Updated `stateVersion` to "24.11"
- Removed `adb` from the list of oh-my-zsh plugins in `zsh.nix`
2024-11-18 19:58:32 +00:00
Giulio De Pasquale
1630bfb8fb fix(sunshine.nix): update CUDA package and disable pulseaudio
- Updated `cudaPackages` to `pkgs.cudaPackages_12_3`
- Changed `boost` version from `pkgs.unstablePkgs.boost186` to `pkgs.boost186`
- Disabled `pulseaudio.enable` and removed redundant `sound.enable`
2024-11-18 19:58:12 +00:00
Giulio De Pasquale
cc77cab961 feat(architect/redlib.nix): add configuration for redlib service
- Added `redlib` systemd service environment variables and settings
- Enabled `redlib` service with specified port and package
- Configured virtual host for `reddit.giugl.io` to forward requests to the `redlib` service
2024-11-18 19:57:49 +00:00
Giulio De Pasquale
949b5f8f21 refactor(headscale.nix): update settings structure and add comments
- Updated `dns_config` to `dns` and adjusted nested fields accordingly.
- Commented out default log level and base domain for clarity.
- Changed `ip_prefixes` to `prefixes.v4` to match expected configuration format.
2024-11-18 19:57:06 +00:00
Giulio De Pasquale
2b17b0b463 refactor(architect/llm.nix): simplify and clean up configuration
- Removed unused frontend domain, port, and listen address variables
- Centralized `ollamaHost` and `ollamaPort` usage
- Cleaned up commented-out sections for future reference or removal
- Ensured consistent placement of `acceleration` in the `services.ollama` block
2024-11-18 19:56:48 +00:00
10 changed files with 38 additions and 87 deletions

24
flake.lock generated
View File

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

View File

@ -1,11 +1,11 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/release-24.05";
nixpkgs.url = "github:NixOS/nixpkgs/release-24.11";
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.05";
url = "github:nix-community/home-manager/release-24.11";
inputs.nixpkgs.follows = "nixpkgs";
};
nvidia-patch = {

View File

@ -28,20 +28,11 @@ in
./dns.nix
# ./minecraft.nix
./prowlarr.nix
./libreddit.nix
./redlib.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
@ -138,7 +129,6 @@ in
hardware.opengl = {
enable = true;
extraPackages = with pkgs; [ vaapiVdpau ];
driSupport = true;
};
services = {

View File

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

View File

@ -1,11 +1,9 @@
{ pkgs, ... }:
let
frontendDomain = "pino.giugl.io";
backendDomain = "ollama.giugl.io";
frontendPort = 3030;
ollamaHost = "127.0.0.1";
ollamaPort = 11434;
listenAddress = "127.0.0.1:${toString ollamaPort}";
ollamaPkg = pkgs.unstablePkgs.ollama;
in
{
@ -14,37 +12,23 @@ in
};
services.ollama = {
inherit listenAddress;
enable = true;
acceleration = "cuda";
package = ollamaPkg;
host = ollamaHost;
port = ollamaPort;
acceleration = "cuda";
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 = "127.0.0.1";
host = ollamaHost;
port = ollamaPort;
allowLan = true;
allowWAN = true;
@ -56,28 +40,4 @@ 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

@ -4,7 +4,7 @@ let
domain = "reddit.giugl.io";
in
{
systemd.services.libreddit.environment = {
systemd.services.redlib.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.libreddit = {
services.redlib = {
enable = true;
port = 9090;
package = pkgs.unstablePkgs.redlib;
@ -22,7 +22,7 @@ in
architect.vhost.${domain} = {
dnsInterfaces = [ "lan" "tailscale" ];
locations."/" = {
port = config.services.libreddit.port;
port = config.services.redlib.port;
allowWAN = true;
};
};

View File

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

View File

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

View File

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

View File

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