Compare commits

..

No commits in common. "e8b09d2fe48ff02693ef1a02d7f7f94971b27b9f" and "0ea4f88c2b5ec13d729e65651fc69630f5c22274" have entirely different histories.

9 changed files with 45 additions and 98 deletions

View File

@ -1,63 +0,0 @@
{ pkgs, config, isLaptop, ... }:
{
services.ollama = {
enable = true;
package = pkgs.ollama-vulkan;
loadModels = [
(if isLaptop then "qwen3.5:9b" else "qwen3.6:27b")
];
};
services.open-webui = {
enable = true;
port = 6767;
openFirewall = false;
environment = {
WEBUI_AUTH = "False"; # No need for auth since it's only accessible by me
OFFLINE_MODE = "True"; # Update checks & model downloads aren't needed
SAFE_MODE = "True";
BYPASS_MODEL_ACCESS_CONTROL = "True";
ENABLE_COMPRESSION_MIDDLEWARE = "False"; # Not needed since I access it via localhost
DEFAULT_RAG_TEMPLATE = ''
### Task:
Respond to the user query using the provided context, incorporating inline citations in the format [id] **only when the <source> tag includes an explicit id attribute** (e.g., <source id="1">).
### Guidelines:
- If you don't know the answer, clearly state that.
- If uncertain, ask the user for clarification.
- Respond in the same language as the user's query.
- If the context is unreadable or of poor quality, inform the user and provide the best possible answer.
- If the answer isn't present in the context but you possess the knowledge, explain this to the user and provide the answer using your own understanding.
- **Only include inline citations using [id] (e.g., [1], [2]) when the <source> tag includes an id attribute.**
- Do not cite if the <source> tag does not contain an id attribute.
- Do not use XML tags in your response.
- Ensure citations are concise and directly related to the information provided.
### Example of Citation:
If the user asks about a specific topic and the information is found in a source with a provided id attribute, the response should include the citation like in the following example:
* "According to the study, the proposed method increases efficiency by 20% [1]."
### Output:
Provide a clear and direct response in the french Chtimi dialect to the user's query, including inline citations in the format [id] only when the <source> tag with id attribute is present in the context.
<context>
{{CONTEXT}}
</context>
'';
};
};
/* TODO: Uncomment when odysseus package supports non-flake installation (& disable open-webui)
services.odysseus = {
enable = true;
xdg.dataHome."odysseus/odysseus-env".source = ./odysseus/.env;
# https://github.com/pewdiepie-archdaemon/odysseus/blob/dev/.env.example
environmentFile = "${config.xdg.dataHome}}/odysseus/odysseus-env";
host = "127.0.0.1";
port = 6767;
};
*/
}

View File

@ -69,8 +69,6 @@ in
./modules/audio.nix
./modules/ananicy.nix
./common/ollama-config.nix
# ISO installer building stuff:
./ISO/iso.nix
];

View File

@ -92,6 +92,7 @@ in
./discord-config.nix
./firefox-config.nix
./mpv-config.nix
./ollama-config.nix
spicetify-nix.homeManagerModules.spicetify
./spicetify-config.nix
];

View File

@ -0,0 +1,18 @@
{ pkgs, config, ... }:
{
services.ollama = {
enable = false; # TODO Enable when odysseus package supports non-flake installation
package = pkgs.ollama-vulkan;
};
/*
services.odysseus = {
enable = true;
xdg.dataHome."odysseus/odysseus-env".source = ./odysseus/.env;
# https://github.com/pewdiepie-archdaemon/odysseus/blob/dev/.env.example
environmentFile = "${config.xdg.dataHome}}/odysseus/odysseus-env";
host = "127.0.0.1";
port = 8008;
};
*/
}

View File

@ -1,7 +1,7 @@
{ config, lib, ... }:
{
# Note: for f2fs, create it with "sudo mkfs.f2fs -l root -i -O extra_attr,flexible_inline_xattr,inode_checksum,sb_checksum,compression,lost_found /dev/sdxY"
# Note: for f2fs, create it with "sudo fsck.f2fs -O extra_attr,flexible_inline_xattr,inode_checksum,sb_checksum,compression,lost_found /dev/sdxY"
fileSystems."/".options = lib.mkIf (config.fileSystems."/".fsType == "f2fs")
(lib.mkAfter [
"discard" # Better (on f2fs) than fstrim

View File

@ -1,4 +1,4 @@
{ config, pkgs, lib, isLaptop, nixtamal, functions, ... }:
{ config, pkgs, lib, isLaptop, nixtamal, ... }:
{
boot.kernelParams = [
@ -41,7 +41,7 @@
pkgs.linuxKernel.packagesFor(
pkgs.cachyosKernels.linux-cachyos-latest.override {
bbr3 = true;
cpusched = "bore";
cpusched = "eevdf"; # / "bore"
lto = if isLaptop then "thin" else "full";
processorOpt = if isLaptop then "zen4" else "x86_64-v3";
tickrate = if isLaptop then "idle" else "full";
@ -49,21 +49,19 @@
)
);
boot.kernelPatches = [ ];
boot.kernelPatches = [
{
name = "infinity-scheduler";
patch = "${nixtamal.infinity-scheduler}/patches/stable/linux-${
lib.versions.majorMinor config.boot.kernelPackages.kernel.version
}-infinity/0001-infinity-scheduler.patch";
}
];
services.scx = { # https://wiki.cachyos.org/configuration/sched-ext/#general-recommendations
enable = true;
scheduler = "scx_lavd";
extraArgs = [ "--${if isLaptop then "autopower" else "performance"}" ];
package = (functions.mkUnstable pkgs.scx.rustscheds).overrideAttrs (old: {
buildInputs = old.buildInputs ++ [ pkgs.openssl /* <-- TODO: Remove when the package gets updated */ ];
passthru = old.passthru // {
schedulers = [ # List of the schedulers in case there's some that didn't exist in last release
"scx_beerland" "scx_bpfland" "scx_cake" "scx_chaos" "scx_characterize" "scx_cosmos" "scx_flash" "scx_flow" "scx_forge" "scx_lavd" "scx_layered" "scx_mitosis" "scx_p2dq" "scx_pandemonium" "scx_rlfifo" "scx_rustland" "scx_rusty" "scx_tickless"
];
};
});
enable = false; # Disable this to use the infinity scheduler
scheduler = "scx_flow";
extraArgs = [ /* TODO for next scx version after 1.1.1: "--no-webui" */ ];
};
boot.kernel.sysctl = {

View File

@ -3,14 +3,9 @@
let
functions = rec {
mkSpecial = pkg: version: src_name: suffix:
let
pkg.overrideAttrs (old: {
inherit version;
src = nixtamal.${src_name + suffix};
in pkg.overrideAttrs (old: {
inherit version src;
} // lib.optionalAttrs (old ? cargoDeps) { # Removes the need to set the cargo vendor hash (that nixtamal doesn't handle, obviously)
cargoDeps = pkgs.rustPlatform.importCargoLock {
lockFile = "${src}/Cargo.lock";
};
});
mkSpecialAuto = pkg: version: suffix: mkSpecial pkg version pkg.pname suffix;
mkSpecialVersion = pkg: version: mkSpecialAuto pkg version "";

View File

@ -8,6 +8,7 @@
,"flake-compat":{"sn":"flake-compat-src","kd":[1,{"ft":0,"ur":"https://github.com/NixOS/flake-compat/archive/5edf11c44bc78a0d334f6334cdaf7d60d732daab.tar.gz","ms":[]}],"ha":{"al":2,"vl":"blake3-MmtcMfj5QuWGiFGGOdUMcaS0MSNzyV8dNCcsrPQq+Gk="},"fv":"5edf11c44bc78a0d334f6334cdaf7d60d732daab","ps":[]}
,"home-manager":{"sn":"home-manager-src","kd":[1,{"ft":0,"ur":"https://github.com/nix-community/home-manager/archive/d32537981c036473cf6990ae03176a5d84c43b29.tar.gz","ms":[]}],"ha":{"al":2,"vl":"blake3-PZL131S3WQvCFTGa262ywuyJi6zUXfdaTJ6/6CPD9Ns="},"fv":"d32537981c036473cf6990ae03176a5d84c43b29","ps":[]}
,"hypr-darkwindow":{"sn":"hypr-darkwindow-src","kd":[1,{"ft":0,"ur":"https://github.com/micha4w/Hypr-DarkWindow/archive/refs/tags/v0.55.4.tar.gz","ms":[]}],"ha":{"al":2,"vl":"blake3-prh51kFbHKZT0ZmWDlv3s/Mg+Mg/mYAIo3FxZ+UsVbo="},"fv":"5dcd175c540e9eef91550c97ed0798c6e0fdc31b90af9643e05cb5ba66c64f6a","ps":[]}
,"infinity-scheduler":{"sn":"infinity-scheduler-src","kd":[1,{"ft":0,"ur":"https://github.com/galpt/infinity-scheduler/archive/9a33bd15c26ccc07ad649d6e8883d78809c80c15.tar.gz","ms":[]}],"ha":{"al":2,"vl":"blake3-e0Jp2PDneJrcp1ydT9BlHiMce2leIMwfJ1/WJfuP0mI="},"fv":"9a33bd15c26ccc07ad649d6e8883d78809c80c15","ps":[]}
,"lact-patch":{"sn":"lact-patch-src","kd":[0,{"ft":0,"ur":"https://patch-diff.githubusercontent.com/raw/ilya-zlobintsev/LACT/pull/1080.patch","ms":[]}],"ha":{"al":2,"vl":"blake3-x+HU/32454H6ZHu2i3AkdPECt9Jj4vW0Ac2jTzjpUvk="},"fv":"W/735aa2b881ef2024d0d6fcb4d2d48dd4","ps":[]}
,"low_latency_layer-git":{"sn":"low_latency_layer-git-src","kd":[1,{"ft":0,"ur":"https://github.com/Korthos-Software/low_latency_layer/archive/3138b14ebd059cd540444771dd184fbf7ead2a12.tar.gz","ms":[]}],"ha":{"al":2,"vl":"blake3-eaek3w60syOHOmRNdCDBTQ+MZw4O9fDGbpirlyuUnoQ="},"fv":"3138b14ebd059cd540444771dd184fbf7ead2a12","ps":[]}
,"lsfg-vk-git":{"sn":"lsfg-vk-git-src","kd":[1,{"ft":0,"ur":"https://github.com/PancakeTAS/lsfg-vk/archive/8b0da2661c6f3473a7fccc8ba643880050e71642.tar.gz","ms":[]}],"ha":{"al":2,"vl":"blake3-dABuL3duPZ9m0X6DizXeGCngZdlfcDpDiiuxfeTnlOM="},"fv":"8b0da2661c6f3473a7fccc8ba643880050e71642","ps":[]}
@ -18,7 +19,6 @@
,"nix-citizen":{"sn":"nix-citizen-src","kd":[1,{"ft":0,"ur":"https://github.com/LovingMelody/nix-citizen/archive/7db41f8024ff84cc5ecc532560a5b6598ca65208.tar.gz","ms":[]}],"ha":{"al":2,"vl":"blake3-jcIN9/pmwil9YpwT/aG4/s4K7xUEcypAu7Kufbwi+lM="},"fv":"7db41f8024ff84cc5ecc532560a5b6598ca65208","ps":[]}
,"nix-gaming":{"sn":"nix-gaming-src","kd":[1,{"ft":0,"ur":"https://github.com/fufexan/nix-gaming/archive/0c07b30bc7bd15014db7154597b34ca12f60398c.tar.gz","ms":[]}],"ha":{"al":2,"vl":"blake3-+BQSCJm+H1Zf9ibHoqoUAz5cWF9XWzhZ/HjkbSnjjpI="},"fv":"0c07b30bc7bd15014db7154597b34ca12f60398c","ps":[]}
,"nix-spicetify":{"sn":"nix-spicetify-src","kd":[1,{"ft":0,"ur":"https://github.com/Gerg-L/spicetify-nix/archive/9cabea6f5973ec01f60080ea50f54f8f6d74dc95.tar.gz","ms":[]}],"ha":{"al":2,"vl":"blake3-EaKmJmkasj95Gwikyn07GPJqaERX7cBmxDD7N2Jl340="},"fv":"9cabea6f5973ec01f60080ea50f54f8f6d74dc95","ps":[]}
,"scx_rustscheds-git":{"sn":"scx_rustscheds-git-src","kd":[1,{"ft":0,"ur":"https://github.com/sched-ext/scx/archive/b911893af7f8ff8a971b47e99151c19115aa2be1.tar.gz","ms":[]}],"ha":{"al":2,"vl":"blake3-AjlWKsWbOzswLbA1NmnymZSTHMA0gT3V9Zn5WAQtgM8="},"fv":"b911893af7f8ff8a971b47e99151c19115aa2be1","ps":[]}
,"spotneotify":{"sn":"spotneotify-src","kd":[1,{"ft":0,"ur":"https://github.com/0lswitcher/spotneotify/archive/42a296482e28e6549baa5c31850ffafb7890a1a8.tar.gz","ms":[]}],"ha":{"al":2,"vl":"blake3-OgtK8Vh6JI2Y/iINgWU6URPPtpbGaNGSPXEoNWWH0lo="},"fv":"42a296482e28e6549baa5c31850ffafb7890a1a8","ps":[]}
}
,"p":{

View File

@ -183,15 +183,6 @@ inputs {
url "https://github.com/micha4w/Hypr-DarkWindow/archive/refs/tags/v0.55.4.tar.gz"
}
}
scx_rustscheds-git {
archive {
url "https://github.com/sched-ext/scx/archive/{{fresh_value}}.tar.gz"
}
fresh-cmd {
$ git ls-remote --branches "https://github.com/sched-ext/scx.git" --refs "refs/heads/main"
| cut -f1
}
}
// Patches
lact-patch { // TODO: Remove this when upstream releases a new version
@ -199,6 +190,15 @@ inputs {
url "https://patch-diff.githubusercontent.com/raw/ilya-zlobintsev/LACT/pull/1080.patch"
}
}
infinity-scheduler {
archive {
url "https://github.com/galpt/infinity-scheduler/archive/{{fresh_value}}.tar.gz"
}
fresh-cmd {
$ git ls-remote --branches "https://github.com/galpt/infinity-scheduler.git" --refs "refs/heads/v3"
| cut -f1
}
}
// Others
catppuccin-godot {