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