misc fixes
This commit is contained in:
parent
2cb40a775c
commit
1c2dd9bcb0
@ -17,6 +17,7 @@
|
|||||||
./services/immich.nix
|
./services/immich.nix
|
||||||
./services/gitea.nix
|
./services/gitea.nix
|
||||||
./services/minecraft.nix
|
./services/minecraft.nix
|
||||||
|
./services/llm.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
systemd.targets = {
|
systemd.targets = {
|
||||||
@ -26,8 +27,6 @@
|
|||||||
hybrid-sleep.enable = false;
|
hybrid-sleep.enable = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
powerManagement.powertop.enable = true;
|
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
#garbage collection and cleanup stuff
|
#garbage collection and cleanup stuff
|
||||||
gc = {
|
gc = {
|
||||||
@ -64,11 +63,11 @@
|
|||||||
compressor = "zstd";
|
compressor = "zstd";
|
||||||
compressorArgs = [ "-19" ];
|
compressorArgs = [ "-19" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
kernelModules = [
|
kernelModules = [
|
||||||
# kernel module for case fan control
|
# kernel module for case fan control
|
||||||
"nct6775"
|
"nct6775"
|
||||||
];
|
];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.etc = {
|
environment.etc = {
|
||||||
@ -230,6 +229,7 @@
|
|||||||
"minecraft"
|
"minecraft"
|
||||||
"gitea"
|
"gitea"
|
||||||
"jellyfin"
|
"jellyfin"
|
||||||
|
"ollama"
|
||||||
];
|
];
|
||||||
hashedPasswordFile = "/etc/nixos/secrets/hashedPass";
|
hashedPasswordFile = "/etc/nixos/secrets/hashedPass";
|
||||||
|
|
||||||
|
|||||||
14
flake.lock
generated
14
flake.lock
generated
@ -58,11 +58,11 @@
|
|||||||
},
|
},
|
||||||
"nixos-hardware": {
|
"nixos-hardware": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1728056216,
|
"lastModified": 1728269138,
|
||||||
"narHash": "sha256-IrO06gFUDTrTlIP3Sz+mRB6WUoO2YsgMtOD3zi0VEt0=",
|
"narHash": "sha256-oKxDImsOvgUZMY4NwXVyUc/c1HiU2qInX+b5BU0yXls=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixos-hardware",
|
"repo": "nixos-hardware",
|
||||||
"rev": "b7ca02c7565fbf6d27ff20dd6dbd49c5b82eef28",
|
"rev": "ecfcd787f373f43307d764762e139a7cdeb9c22b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -74,16 +74,16 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1728018373,
|
"lastModified": 1728348559,
|
||||||
"narHash": "sha256-NOiTvBbRLIOe5F6RbHaAh6++BNjsb149fGZd1T4+KBg=",
|
"narHash": "sha256-jVgMjAEhwvnuI1WZWoZfM8Luh3zsjn4ZsfOHKKF7kKI=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "bc947f541ae55e999ffdb4013441347d83b00feb",
|
"rev": "6235ae1ef7b09fe720a7f32bd38f74ccb859305a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"ref": "nixos-unstable",
|
"ref": "master",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,8 +2,8 @@
|
|||||||
description = "Flake for server muffin";
|
description = "Flake for server muffin";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
# nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
# nixpkgs.url = "github:NixOS/nixpkgs/master";
|
nixpkgs.url = "github:NixOS/nixpkgs/master";
|
||||||
|
|
||||||
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
||||||
|
|
||||||
@ -39,6 +39,7 @@
|
|||||||
torrent = 6011;
|
torrent = 6011;
|
||||||
minecraft = 25565;
|
minecraft = 25565;
|
||||||
gitea = 3281;
|
gitea = 3281;
|
||||||
|
ollama = 11434;
|
||||||
};
|
};
|
||||||
|
|
||||||
https = {
|
https = {
|
||||||
@ -76,6 +77,10 @@
|
|||||||
data_dir = service_configs.services_dir + "/jellyfin";
|
data_dir = service_configs.services_dir + "/jellyfin";
|
||||||
cache_dir = service_configs.services_dir + "/jellyfin_cache";
|
cache_dir = service_configs.services_dir + "/jellyfin_cache";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ollama = {
|
||||||
|
data_dir = service_configs.services_dir + "/ollama";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|||||||
Binary file not shown.
19
services/llm.nix
Normal file
19
services/llm.nix
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
service_configs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
services.ollama = {
|
||||||
|
enable = true;
|
||||||
|
home = service_configs.ollama.data_dir + "/home";
|
||||||
|
models = service_configs.ollama.data_dir + "/home/models";
|
||||||
|
environmentVariables = {
|
||||||
|
OLLAMA_LLM_LIBRARY = "cpu_avx2";
|
||||||
|
};
|
||||||
|
host = "0.0.0.0";
|
||||||
|
port = service_configs.ports.ollama;
|
||||||
|
user = "ollama";
|
||||||
|
};
|
||||||
|
}
|
||||||
@ -5,7 +5,7 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
heap_size = "6144M";
|
heap_size = "3000M";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
nixpkgs.config.allowUnfreePredicate =
|
nixpkgs.config.allowUnfreePredicate =
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
{ service_configs, ... }:
|
{ service_configs, config, ... }:
|
||||||
{
|
{
|
||||||
virtualisation.quadlet = {
|
virtualisation.quadlet = {
|
||||||
containers = {
|
containers = {
|
||||||
@ -31,11 +31,13 @@
|
|||||||
containerConfig = {
|
containerConfig = {
|
||||||
image = "lscr.io/linuxserver/qbittorrent:latest";
|
image = "lscr.io/linuxserver/qbittorrent:latest";
|
||||||
name = "qbittorrent";
|
name = "qbittorrent";
|
||||||
|
autoUpdate = "registry";
|
||||||
|
|
||||||
environments = {
|
environments = {
|
||||||
WEBUI_PORT = service_configs.ports.torrent;
|
WEBUI_PORT = service_configs.ports.torrent;
|
||||||
DOCKER_MODS = "ghcr.io/gabe565/linuxserver-mod-vuetorrent";
|
DOCKER_MODS = "ghcr.io/gabe565/linuxserver-mod-vuetorrent";
|
||||||
PUID = 1000;
|
# PUID = 1000;
|
||||||
PGID = 1000;
|
PGID = config.users.groups.${config.services.jellyfin.group}.gid;
|
||||||
};
|
};
|
||||||
|
|
||||||
volumes = [
|
volumes = [
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user