Compare commits

..

8 Commits

Author SHA1 Message Date
e8b09d2fe4
Add root label to mkfs command 2026-07-02 02:39:46 +02:00
31d22b9ae1
Fix mkfs.f2fs comment
I created my filesystem with a very low inodes count maximum which is very bad
2026-07-02 02:24:53 +02:00
f7b57fb162
Enable ollama web-ui 2026-07-02 02:15:15 +02:00
9b332d1f34
Remove infinity-scheduler, use scx_lavd 2026-07-01 23:43:35 +02:00
3e9f4db22f
Update infinity-scheduler to v4 2026-07-01 21:26:44 +02:00
8a71e93ef6
Adapt functions.mkSpecial to work for rust packages + use SCX from git 2026-07-01 21:19:43 +02:00
8bf9ad43a0
Revert "Go back to using infinity-scheduler"
This reverts commit 0ea4f88c2b.
2026-07-01 20:25:02 +02:00
0ea4f88c2b
Go back to using infinity-scheduler
The issues I had should now be fixed
2026-07-01 18:11:42 +02:00
9 changed files with 98 additions and 45 deletions

63
common/ollama-config.nix Normal file
View File

@ -0,0 +1,63 @@
{ 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,6 +69,8 @@ in
./modules/audio.nix ./modules/audio.nix
./modules/ananicy.nix ./modules/ananicy.nix
./common/ollama-config.nix
# ISO installer building stuff: # ISO installer building stuff:
./ISO/iso.nix ./ISO/iso.nix
]; ];

View File

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

View File

@ -1,18 +0,0 @@
{ 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, ... }: { config, lib, ... }:
{ {
# Note: for f2fs, create it with "sudo fsck.f2fs -O extra_attr,flexible_inline_xattr,inode_checksum,sb_checksum,compression,lost_found /dev/sdxY" # 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"
fileSystems."/".options = lib.mkIf (config.fileSystems."/".fsType == "f2fs") fileSystems."/".options = lib.mkIf (config.fileSystems."/".fsType == "f2fs")
(lib.mkAfter [ (lib.mkAfter [
"discard" # Better (on f2fs) than fstrim "discard" # Better (on f2fs) than fstrim

View File

@ -1,4 +1,4 @@
{ config, pkgs, lib, isLaptop, nixtamal, ... }: { config, pkgs, lib, isLaptop, nixtamal, functions, ... }:
{ {
boot.kernelParams = [ boot.kernelParams = [
@ -41,7 +41,7 @@
pkgs.linuxKernel.packagesFor( pkgs.linuxKernel.packagesFor(
pkgs.cachyosKernels.linux-cachyos-latest.override { pkgs.cachyosKernels.linux-cachyos-latest.override {
bbr3 = true; bbr3 = true;
cpusched = "eevdf"; # / "bore" cpusched = "bore";
lto = if isLaptop then "thin" else "full"; lto = if isLaptop then "thin" else "full";
processorOpt = if isLaptop then "zen4" else "x86_64-v3"; processorOpt = if isLaptop then "zen4" else "x86_64-v3";
tickrate = if isLaptop then "idle" else "full"; tickrate = if isLaptop then "idle" else "full";
@ -49,19 +49,21 @@
) )
); );
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 services.scx = { # https://wiki.cachyos.org/configuration/sched-ext/#general-recommendations
enable = true; # Disable this to use the infinity scheduler enable = true;
scheduler = "scx_flow"; scheduler = "scx_lavd";
extraArgs = [ /* TODO for next scx version after 1.1.1: "--no-webui" */ ]; 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"
];
};
});
}; };
boot.kernel.sysctl = { boot.kernel.sysctl = {

View File

@ -3,9 +3,14 @@
let let
functions = rec { functions = rec {
mkSpecial = pkg: version: src_name: suffix: mkSpecial = pkg: version: src_name: suffix:
pkg.overrideAttrs (old: { let
inherit version;
src = nixtamal.${src_name + suffix}; 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; mkSpecialAuto = pkg: version: suffix: mkSpecial pkg version pkg.pname suffix;
mkSpecialVersion = pkg: version: mkSpecialAuto pkg version ""; mkSpecialVersion = pkg: version: mkSpecialAuto pkg version "";

View File

@ -8,7 +8,6 @@
,"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":[]} ,"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":[]} ,"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":[]} ,"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":[]} ,"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":[]} ,"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":[]} ,"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":[]}
@ -19,6 +18,7 @@
,"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-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-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":[]} ,"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":[]} ,"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":{ ,"p":{

View File

@ -183,6 +183,15 @@ inputs {
url "https://github.com/micha4w/Hypr-DarkWindow/archive/refs/tags/v0.55.4.tar.gz" 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 // Patches
lact-patch { // TODO: Remove this when upstream releases a new version lact-patch { // TODO: Remove this when upstream releases a new version
@ -190,15 +199,6 @@ inputs {
url "https://patch-diff.githubusercontent.com/raw/ilya-zlobintsev/LACT/pull/1080.patch" 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 // Others
catppuccin-godot { catppuccin-godot {