feat(nixos): add terraria and gamemode services and update configurations
This commit is contained in:
94
flake.lock
generated
94
flake.lock
generated
@@ -912,6 +912,24 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-parts_4": {
|
"flake-parts_4": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs-lib": "nixpkgs-lib_2"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1722555600,
|
||||||
|
"narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=",
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"rev": "8471fe90ad337a8074e957b69ca4d0089218391d",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-parts_5": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs-lib": [
|
"nixpkgs-lib": [
|
||||||
"lanzaboote",
|
"lanzaboote",
|
||||||
@@ -932,7 +950,25 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-parts_5": {
|
"flake-parts_6": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs-lib": "nixpkgs-lib_3"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1730504689,
|
||||||
|
"narHash": "sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS+b4tfNFCwE=",
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"rev": "506278e768c2a08bec68eb62932193e341f55c90",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-parts_7": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs-lib": [
|
"nixpkgs-lib": [
|
||||||
"nixvim",
|
"nixvim",
|
||||||
@@ -953,7 +989,7 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-parts_6": {
|
"flake-parts_8": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs-lib": [
|
"nixpkgs-lib": [
|
||||||
"nur",
|
"nur",
|
||||||
@@ -974,7 +1010,7 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-parts_7": {
|
"flake-parts_9": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs-lib": [
|
"nixpkgs-lib": [
|
||||||
"stylix",
|
"stylix",
|
||||||
@@ -1959,13 +1995,18 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ik_llama": {
|
"ik_llama": {
|
||||||
"flake": false,
|
"inputs": {
|
||||||
|
"flake-parts": "flake-parts_4",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1761491330,
|
"lastModified": 1761814188,
|
||||||
"narHash": "sha256-z3Xojb/4Mbc0cZhePBpIKGCIP1Hzey8FBnFkEPR4PVs=",
|
"narHash": "sha256-DFQbWKotdhsWWPCxdaYSKb5/SoZwnEwDfk0Av3J46cI=",
|
||||||
"owner": "ikawrakow",
|
"owner": "ikawrakow",
|
||||||
"repo": "ik_llama.cpp",
|
"repo": "ik_llama.cpp",
|
||||||
"rev": "f76e98536f9377b29e2058cf83e0aa0450b631c8",
|
"rev": "14760aaf46383a7c4d2302277412ca8c423613c5",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -2047,7 +2088,7 @@
|
|||||||
"inputs": {
|
"inputs": {
|
||||||
"crane": "crane_4",
|
"crane": "crane_4",
|
||||||
"flake-compat": "flake-compat_5",
|
"flake-compat": "flake-compat_5",
|
||||||
"flake-parts": "flake-parts_4",
|
"flake-parts": "flake-parts_5",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
],
|
],
|
||||||
@@ -2090,7 +2131,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"llama-cpp": {
|
"llama-cpp": {
|
||||||
"flake": false,
|
"inputs": {
|
||||||
|
"flake-parts": "flake-parts_6",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1755280252,
|
"lastModified": 1755280252,
|
||||||
"narHash": "sha256-0mONJiAOxdLNeBjDlMKMjk0NtrF8oEtVdw+QlDWrRq8=",
|
"narHash": "sha256-0mONJiAOxdLNeBjDlMKMjk0NtrF8oEtVdw+QlDWrRq8=",
|
||||||
@@ -2511,6 +2557,30 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixpkgs-lib_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1722555339,
|
||||||
|
"narHash": "sha256-uFf2QeW7eAHlYXuDktm9c25OxOyCoUOQmh5SZ9amE5Q=",
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs-lib_3": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1730504152,
|
||||||
|
"narHash": "sha256-lXvH/vOfb4aGYyvFmZK/HlsNsr/0CVWlwYvo2rxJk3s=",
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://github.com/NixOS/nixpkgs/archive/cc2f28000298e1269cea6612cd06ec9979dd5d7f.tar.gz"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://github.com/NixOS/nixpkgs/archive/cc2f28000298e1269cea6612cd06ec9979dd5d7f.tar.gz"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs-master": {
|
"nixpkgs-master": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1761567118,
|
"lastModified": 1761567118,
|
||||||
@@ -2715,7 +2785,7 @@
|
|||||||
},
|
},
|
||||||
"nixvim": {
|
"nixvim": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-parts": "flake-parts_5",
|
"flake-parts": "flake-parts_7",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
],
|
],
|
||||||
@@ -2804,7 +2874,7 @@
|
|||||||
},
|
},
|
||||||
"nur": {
|
"nur": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-parts": "flake-parts_6",
|
"flake-parts": "flake-parts_8",
|
||||||
"nixpkgs": "nixpkgs_12"
|
"nixpkgs": "nixpkgs_12"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
@@ -3324,7 +3394,7 @@
|
|||||||
"base16-helix": "base16-helix",
|
"base16-helix": "base16-helix",
|
||||||
"base16-vim": "base16-vim",
|
"base16-vim": "base16-vim",
|
||||||
"firefox-gnome-theme": "firefox-gnome-theme",
|
"firefox-gnome-theme": "firefox-gnome-theme",
|
||||||
"flake-parts": "flake-parts_7",
|
"flake-parts": "flake-parts_9",
|
||||||
"gnome-shell": "gnome-shell",
|
"gnome-shell": "gnome-shell",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
|
|||||||
@@ -199,12 +199,12 @@
|
|||||||
ik_llama = {
|
ik_llama = {
|
||||||
url = "github:ikawrakow/ik_llama.cpp?submodules=1";
|
url = "github:ikawrakow/ik_llama.cpp?submodules=1";
|
||||||
# submodules = true;
|
# submodules = true;
|
||||||
flake = false;
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
llama-cpp = {
|
llama-cpp = {
|
||||||
# url = "https://github.com/ggml-org/llama.cpp";
|
# url = "https://github.com/ggml-org/llama.cpp";
|
||||||
url = "github:ggml-org/llama.cpp/b6178?submodules=1";
|
url = "github:ggml-org/llama.cpp/b6178?submodules=1";
|
||||||
flake = false;
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
immich = {
|
immich = {
|
||||||
url = "github:immich-app/immich/v1.142.0";
|
url = "github:immich-app/immich/v1.142.0";
|
||||||
|
|||||||
@@ -6,6 +6,9 @@
|
|||||||
}:
|
}:
|
||||||
lib.mkIf (device.is "ryu") {
|
lib.mkIf (device.is "ryu") {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
lmstudio
|
(lmstudio.overrideAttrs
|
||||||
|
(old: {
|
||||||
|
extraPkgs = old.extraPkgs or [] ++ [pkgs.cudaPackages.cudatoolkit];
|
||||||
|
}))
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -102,21 +102,8 @@
|
|||||||
metrics = false;
|
metrics = false;
|
||||||
};
|
};
|
||||||
buffer_font_size = lib.mkDefault 15;
|
buffer_font_size = lib.mkDefault 15;
|
||||||
# language_models = {
|
language_models = {
|
||||||
# ollama = {
|
};
|
||||||
# api_url = "https://ollama.ryu.darksailor.dev";
|
|
||||||
# available_models = [
|
|
||||||
# {
|
|
||||||
# name = "qwen3:30b-a3b";
|
|
||||||
# display_name = "Qwen3 MoE (30b-a3b)";
|
|
||||||
# max_tokens = 32768;
|
|
||||||
# supports_tools = true;
|
|
||||||
# supports_thinking = false;
|
|
||||||
# supports_images = false;
|
|
||||||
# }
|
|
||||||
# ];
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
terminal = {
|
terminal = {
|
||||||
shell = {
|
shell = {
|
||||||
program = "${pkgs.fish}/bin/fish";
|
program = "${pkgs.fish}/bin/fish";
|
||||||
|
|||||||
2
justfile
2
justfile
@@ -6,7 +6,7 @@ install:
|
|||||||
|
|
||||||
[linux]
|
[linux]
|
||||||
install:
|
install:
|
||||||
sudo nixos-rebuild switch --flake .
|
sudo nixos-rebuild switch --flake . --builders ''
|
||||||
|
|
||||||
[macos]
|
[macos]
|
||||||
build:
|
build:
|
||||||
|
|||||||
@@ -2,5 +2,6 @@
|
|||||||
imports = [
|
imports = [
|
||||||
./minecraft.nix
|
./minecraft.nix
|
||||||
./satisfactory.nix
|
./satisfactory.nix
|
||||||
|
./terraria.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
7
nixos/mirai/services/games/terraria.nix
Normal file
7
nixos/mirai/services/games/terraria.nix
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{...}: {
|
||||||
|
services.terraria = {
|
||||||
|
enable = true;
|
||||||
|
# port = 7777;
|
||||||
|
autoCreatedWorldSize = "large";
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -8,5 +8,6 @@
|
|||||||
./obs-studio.nix
|
./obs-studio.nix
|
||||||
./gnome-disks.nix
|
./gnome-disks.nix
|
||||||
./nix-ld.nix
|
./nix-ld.nix
|
||||||
|
./gamemode.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
5
nixos/ryu/programs/gamemode.nix
Normal file
5
nixos/ryu/programs/gamemode.nix
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{...}: {
|
||||||
|
programs.gamemode = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -4,10 +4,17 @@
|
|||||||
gamescopeSession.enable = true;
|
gamescopeSession.enable = true;
|
||||||
remotePlay.openFirewall = true;
|
remotePlay.openFirewall = true;
|
||||||
dedicatedServer.openFirewall = true;
|
dedicatedServer.openFirewall = true;
|
||||||
|
localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers
|
||||||
extraCompatPackages = [
|
extraCompatPackages = [
|
||||||
pkgs.proton-ge-bin
|
pkgs.proton-ge-bin
|
||||||
|
pkgs.gamescope
|
||||||
|
pkgs.mangohud
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
programs.gamescope = {
|
||||||
|
enable = true;
|
||||||
|
capSysNice = true;
|
||||||
|
};
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
pkgs.protonup-qt
|
pkgs.protonup-qt
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -87,6 +87,7 @@
|
|||||||
"nvidia_modeset"
|
"nvidia_modeset"
|
||||||
"nvidia_drm"
|
"nvidia_drm"
|
||||||
"dm-snapshot"
|
"dm-snapshot"
|
||||||
|
"dm-mirror"
|
||||||
];
|
];
|
||||||
boot.kernelParams = [
|
boot.kernelParams = [
|
||||||
"intel_iommu=on"
|
"intel_iommu=on"
|
||||||
|
|||||||
@@ -4,8 +4,8 @@
|
|||||||
# ./sunshine.nix
|
# ./sunshine.nix
|
||||||
# ./zerotier.nix
|
# ./zerotier.nix
|
||||||
# ./dnscrypt.nix
|
# ./dnscrypt.nix
|
||||||
./ollama.nix
|
# ./ollama.nix
|
||||||
# ./llama.nix
|
./llama.nix
|
||||||
./tailscale.nix
|
./tailscale.nix
|
||||||
./samba.nix
|
./samba.nix
|
||||||
./mullvad.nix
|
./mullvad.nix
|
||||||
|
|||||||
@@ -1,20 +1,28 @@
|
|||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
config,
|
config,
|
||||||
|
inputs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
services = {
|
services = {
|
||||||
llama-cpp = {
|
llama-cpp = {
|
||||||
enable = true;
|
enable = true;
|
||||||
port = 11435;
|
port = 11345;
|
||||||
model = pkgs.fetchurl {
|
model = "/nix/store/ch6z9di3l0k54ad29pzv8k3zv47q30d1-Qwen3-Coder-30B-A3B-Instruct-Q4_K_M.gguf";
|
||||||
url = "https://huggingface.co/lmstudio-community/gpt-oss-20b-GGUF/resolve/main/gpt-oss-20b-MXFP4.gguf";
|
# model = pkgs.fetchurl {
|
||||||
sha256 = "65d06d31a3977d553cb3af137b5c26b5f1e9297a6aaa29ae7caa98788cde53ab";
|
# # url = "https://huggingface.co/lmstudio-community/gpt-oss-20b-GGUF/resolve/main/gpt-oss-20b-MXFP4.gguf";
|
||||||
};
|
# # sha256 = "65d06d31a3977d553cb3af137b5c26b5f1e9297a6aaa29ae7caa98788cde53ab";
|
||||||
# package = pkgs.ik_llama;
|
# url = "https://huggingface.co/lmstudio-community/Qwen3-Coder-30B-A3B-Instruct-GGUF/resolve/main/Qwen3-Coder-30B-A3B-Instruct-Q4_K_M.gguf";
|
||||||
};
|
# sha256 = "79ad15a5ee3caddc3f4ff0db33a14454a5a3eb503d7fa1c1e35feafc579de486";
|
||||||
ollama = {
|
# };
|
||||||
enable = true;
|
extraFlags = [
|
||||||
|
"-c"
|
||||||
|
"98304"
|
||||||
|
"--jinja"
|
||||||
|
# "--chat-template-file"
|
||||||
|
# "/nix/store/4zk1p50hrzghp3jzzysz96pa64i2kmjl-promp.hbs"
|
||||||
|
];
|
||||||
|
# package = inputs.llama-cpp.packages.${pkgs.system}.cuda;
|
||||||
};
|
};
|
||||||
caddy = {
|
caddy = {
|
||||||
virtualHosts."llama.ryu.darksailor.dev".extraConfig = ''
|
virtualHosts."llama.ryu.darksailor.dev".extraConfig = ''
|
||||||
@@ -23,7 +31,7 @@
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
# environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
# vllm
|
llama-cpp
|
||||||
# ];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
}: {
|
}: {
|
||||||
services = {
|
services = {
|
||||||
ollama = {
|
ollama = {
|
||||||
enable = true;
|
enable = false;
|
||||||
host = "0.0.0.0";
|
host = "0.0.0.0";
|
||||||
# loadModels = ["deepseek-r1:7b" "deepseek-r1:14b" "RobinBially/nomic-embed-text-8k" "qwen3:8b" "qwen3:14b"];
|
# loadModels = ["deepseek-r1:7b" "deepseek-r1:14b" "RobinBially/nomic-embed-text-8k" "qwen3:8b" "qwen3:14b"];
|
||||||
# loadModels = ["deepseek-r1:7b" "deepseek-r1:14b" "RobinBially/nomic-embed-text-8k" "qwen3:8b" "qwen3:14b"];
|
# loadModels = ["deepseek-r1:7b" "deepseek-r1:14b" "RobinBially/nomic-embed-text-8k" "qwen3:8b" "qwen3:14b"];
|
||||||
|
|||||||
13
overlays.nix
13
overlays.nix
@@ -121,10 +121,10 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
ddcbacklight = inputs.ddcbacklight.packages.${prev.system}.ddcbacklight;
|
ddcbacklight = inputs.ddcbacklight.packages.${prev.system}.ddcbacklight;
|
||||||
ik_llama = prev.llama-cpp.overrideAttrs (oldAttrs: {
|
# ik_llama = prev.llama-cpp.overrideAttrs (oldAttrs: {
|
||||||
src = inputs.ik_llama;
|
# src = inputs.ik_llama;
|
||||||
version = "5995";
|
# version = "5995";
|
||||||
});
|
# });
|
||||||
# llama-cpp = prev.llama-cpp.overrideAttrs (oldAttrs: {
|
# llama-cpp = prev.llama-cpp.overrideAttrs (oldAttrs: {
|
||||||
# src = inputs.llama-cpp;
|
# src = inputs.llama-cpp;
|
||||||
# version = "6178";
|
# version = "6178";
|
||||||
@@ -304,14 +304,15 @@ in [
|
|||||||
inputs.rust-overlay.overlays.default
|
inputs.rust-overlay.overlays.default
|
||||||
inputs.nix-minecraft.overlay
|
inputs.nix-minecraft.overlay
|
||||||
inputs.lfca.overlays.default
|
inputs.lfca.overlays.default
|
||||||
# inputs.ik_llama.overlays.default
|
|
||||||
jellyfin
|
jellyfin
|
||||||
libfprint
|
libfprint
|
||||||
misc-applications
|
misc-applications
|
||||||
nix-index-db
|
nix-index-db
|
||||||
shell-scipts
|
shell-scipts
|
||||||
tmuxPlugins
|
tmuxPlugins
|
||||||
|
zellij
|
||||||
|
# inputs.llama-cpp.overlays.default
|
||||||
|
# inputs.ik_llama.overlays.default
|
||||||
# tree-sitter-grammars
|
# tree-sitter-grammars
|
||||||
# vimPlugins
|
# vimPlugins
|
||||||
zellij
|
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user