From 7751c36e7c05a19a84f14766356204f3d3630f46 Mon Sep 17 00:00:00 2001 From: TheK0tYaRa Date: Fri, 13 Mar 2026 09:38:21 +0200 Subject: [PATCH 1/3] codex bump, fixup --- custom/override.nix | 30 +++++---------------------- flake.lock | 32 ++++++++++++++--------------- flake.nix | 50 ++++++++++++++++++++++----------------------- home.nix | 12 ++++++----- 4 files changed, 53 insertions(+), 71 deletions(-) diff --git a/custom/override.nix b/custom/override.nix index 6866a6b..a89c2ce 100644 --- a/custom/override.nix +++ b/custom/override.nix @@ -31,37 +31,17 @@ final: prev: { # "$unitDir/xdg-desktop-portal-cosmic.service" # ''; # }); - # codex = prev.codex.overrideAttrs ( - # old: - # let - # version = "0.111.0"; - # src = prev.fetchFromGitHub { - # owner = "openai"; - # repo = "codex"; - # tag = "rust-v${version}"; - # hash = "sha256-hdR70BhiMg9G/ibLCeHnRSY3PcGZDv0vnqBCbzSRD6I="; - # }; - # in - # { - # cargoDeps = old.cargoDeps.overrideAttrs (_: { - # inherit src; - # name = "codex-${version}-vendor.tar.gz"; - # sourceRoot = "${src.name}/codex-rs"; - # outputHash = "sha256-FR0GQenZ6CFhHUdi3FnuwIsqo0argAJo5STBwlGCsdg="; - # outputHashMode = "recursive"; - # }); - # } # ); codex = prev.codex.overrideAttrs ( old: let - version = "0.112.0"; + version = "0.114.0"; src = prev.fetchFromGitHub { owner = "openai"; repo = "codex"; tag = "rust-v${version}"; - hash = "sha256-tOrqGXh4k5GzcPhCUaiYoUVt4liYfgRd2ejkrdQpqWs="; - # hash = ""; + hash = "sha256-7t+mVwP4+YrG1ciI+OLqsK7TUM9SrDbPsJNrt26iy9c="; + #hash = ""; }; in { @@ -71,8 +51,8 @@ final: prev: { cargoDeps = prev.rustPlatform.fetchCargoVendor { inherit src; sourceRoot = "${src.name}/codex-rs"; - hash = "sha256-2+9cIslfR8BD3oN6Icfpmzz9vDMGr1NcIwiHK3qoukE="; - # hash = prev.lib.fakeHash; + hash = "sha256-XThIexu3V18JG4OtyvYmybaRMctYpDuBLLH+lUvrtt8="; + #hash = prev.lib.fakeHash; }; buildInputs = (old.buildInputs or [ ]) ++ [ prev.libcap ]; diff --git a/flake.lock b/flake.lock index e81e9c8..144b3b5 100644 --- a/flake.lock +++ b/flake.lock @@ -413,11 +413,11 @@ ] }, "locked": { - "lastModified": 1773264496, - "narHash": "sha256-uwFY0+UfaGEo6205ixeBjplZxHWr56UQef+MtmJ0PW0=", + "lastModified": 1773367248, + "narHash": "sha256-FFMc1uAwy2GYasd0rdNDVxKyAgzuoJH2M+GglBQbqf0=", "owner": "nix-community", "repo": "home-manager", - "rev": "32f78141a98098efed490842923b25ecb93b9b9f", + "rev": "be0c641a6a5564caa33982faa1fe2c60d92131c7", "type": "github" }, "original": { @@ -548,11 +548,11 @@ ] }, "locked": { - "lastModified": 1773270058, - "narHash": "sha256-xDyIZu4zbhFIOHfL0nwRcW6nTDtDZ2xPy6Z/7F2OaIQ=", + "lastModified": 1773276679, + "narHash": "sha256-ybzGoAbp8f6syh33JzUS0ABa+Prt/gfaF50FrzBS9zM=", "ref": "refs/heads/nixos-unstable", - "rev": "b05f04c584c2309eae08e6bea1f5227e2a027532", - "revCount": 5, + "rev": "2e5b60fcc755b9556f16a5d9d8e06adde18cfacc", + "revCount": 6, "type": "git", "url": "https://git.sys-con.ru/thek0tyara/nixpkgs-extension.git" }, @@ -573,11 +573,11 @@ "xwayland-satellite-unstable": "xwayland-satellite-unstable" }, "locked": { - "lastModified": 1773170801, - "narHash": "sha256-TB9/4xKh8tZcbOtxlHB24EO4NlEIorxtcL3L7LOWLqA=", + "lastModified": 1773329386, + "narHash": "sha256-Xoy4j0NKRrZEAkiFxtTKTsmtUumpvjh3ievyat00eA8=", "owner": "sodiboo", "repo": "niri-flake", - "rev": "5336c8d137d1a3ad055e83fa08dcb17c1f2b9444", + "rev": "815e692569fbb01701770a49ad2fe942cec7f431", "type": "github" }, "original": { @@ -688,11 +688,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1773068389, - "narHash": "sha256-vMrm7Pk2hjBRPnCSjhq1pH0bg350Z+pXhqZ9ICiqqCs=", + "lastModified": 1773222311, + "narHash": "sha256-BHoB/XpbqoZkVYZCfXJXfkR+GXFqwb/4zbWnOr2cRcU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "44bae273f9f82d480273bab26f5c50de3724f52f", + "rev": "0590cd39f728e129122770c029970378a79d076a", "type": "github" }, "original": { @@ -733,11 +733,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1772963539, - "narHash": "sha256-9jVDGZnvCckTGdYT53d/EfznygLskyLQXYwJLKMPsZs=", + "lastModified": 1773282481, + "narHash": "sha256-b/GV2ysM8mKHhinse2wz+uP37epUrSE+sAKXy/xvBY4=", "owner": "nixos", "repo": "nixpkgs", - "rev": "9dcb002ca1690658be4a04645215baea8b95f31d", + "rev": "fe416aaedd397cacb33a610b33d60ff2b431b127", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 749115e..fed8d49 100644 --- a/flake.nix +++ b/flake.nix @@ -345,30 +345,30 @@ } ]; }; - homeManager."thek0tyara@testenv" = home-manager.lib.homeManagerConfiguration { - inherit pkgs; - modules = [ - ragenix.homeManagerModules.default - ( - { config, ... }: - { - age.secrets = { - "openrouter-open.key.age" = { - file = ./secrets/openrouter-open.key.age; - # owner = "root"; - # group = "wheel"; - # mode = "0440"; - }; - }; - programs.fish = { - shellInit = '' - echo fuck - set -U OPENROUTER_API $(cat ${config.age.secrets."openrouter-open.key.age".path}) - ''; - }; - } - ) - ]; - }; + # homeManager."thek0tyara@testenv" = home-manager.lib.homeManagerConfiguration { + # inherit pkgs; + # modules = [ + # ragenix.homeManagerModules.default + # ( + # { config, ... }: + # { + # age.secrets = { + # "openrouter-open.key.age" = { + # file = ./secrets/openrouter-open.key.age; + # # owner = "root"; + # # group = "wheel"; + # # mode = "0440"; + # }; + # }; + # programs.fish = { + # shellInit = '' + # echo fuck + # set -U OPENROUTER_API $(cat ${config.age.secrets."openrouter-open.key.age".path}) + # ''; + # }; + # } + # ) + # ]; + # }; }; } diff --git a/home.nix b/home.nix index 8c536ac..83c0e0f 100644 --- a/home.nix +++ b/home.nix @@ -95,7 +95,7 @@ ### neural networks dsearch lmstudio - vllm + # vllm # kdePackages.kdenlive (python313.withPackages ( @@ -467,11 +467,13 @@ codex = { enable = true; settings = { - # model = "gpt-5.4"; - # approval_policy = "on-request"; - # model_reasoning_effort = "high"; + model = "gpt-5.4"; + approval_policy = "on-request"; + model_reasoning_effort = "high"; # - model_provider = "openrouter"; + # model_provider = "openrouter"; + # model_providers = { + # }; }; }; # command-not-found.enable = true; From 047e41747e4751c86bdef57c15e7bee5c2f55014 Mon Sep 17 00:00:00 2001 From: TheK0tYaRa Date: Fri, 13 Mar 2026 11:50:36 +0200 Subject: [PATCH 2/3] fixup --- custom/override.nix | 25 ------------------------- flake.nix | 1 + home.nix | 5 +++++ 3 files changed, 6 insertions(+), 25 deletions(-) diff --git a/custom/override.nix b/custom/override.nix index a89c2ce..7915bbf 100644 --- a/custom/override.nix +++ b/custom/override.nix @@ -1,29 +1,4 @@ final: prev: { - # ccacheWrapper = prev.ccacheWrapper.override { - # extraConfig = '' - # export CCACHE_COMPRESS=1 - # export CCACHE_SLOPPINESS=random_seed,time_macros - # export CCACHE_COMPILERCHECK=content - # export CCACHE_DIR="/home/thek0tyara/Documents/cache/ccache/" - # export CCACHE_UMASK=007 - # if [ ! -d "$CCACHE_DIR" ]; then - # echo "=====" - # echo "Directory '$CCACHE_DIR' does not exist" - # echo "Please create it with:" - # echo " sudo mkdir -m0770 '$CCACHE_DIR'" - # echo " sudo chown root:nixbld '$CCACHE_DIR'" - # echo "=====" - # exit 1 - # fi - # if [ ! -w "$CCACHE_DIR" ]; then - # echo "=====" - # echo "Directory '$CCACHE_DIR' is not accessible for user $(whoami)" - # echo "Please verify its access permissions" - # echo "=====" - # exit 1 - # fi - # ''; - # }; # xdg-desktop-portal-cosmic = prev.xdg-desktop-portal-cosmic.overrideAttrs (old: { # postPatch = (old.postPatch or "") + '' # unitDir="$out/lib/systemd/user" diff --git a/flake.nix b/flake.nix index fed8d49..946c4fa 100644 --- a/flake.nix +++ b/flake.nix @@ -113,6 +113,7 @@ "root" "thek0tyara" ]; + sandbox = "relaxed"; extra-sandbox-paths = [ "/run/sccache" "/var/cache/sccache" diff --git a/home.nix b/home.nix index 83c0e0f..2858944 100644 --- a/home.nix +++ b/home.nix @@ -116,6 +116,11 @@ OLLAMA_HOST = "127.0.0.1:11434"; SCCACHE_DIR = "${config.home.homeDirectory}/.cache/sccache"; SCCACHE_SERVER_UDS = "${config.home.homeDirectory}/.cache/sccache/server.sock"; + ### openrouter fun + OPENROUTER_API_KEY = config.age.secrets."openrouter-open" ; + ANTHROPIC_BASE_URL = "https://openrouter.ai/api"; + ANTHROPIC_AUTH_TOKEN = ${config.home.sessionVariables.OPENROUTER_API_KEY}; + ANTHROPIC_API_KEY = ""; }; file = { ".config/waybar/power_menu.xml".text = '' From 575e2db66cb6274de7831b28670db00763bf853c Mon Sep 17 00:00:00 2001 From: TheK0tYaRa Date: Fri, 13 Mar 2026 13:13:19 +0200 Subject: [PATCH 3/3] openrouter prep --- flake.lock | 6 +++--- flake.nix | 12 ++++++------ home.nix | 16 +++++++++++----- 3 files changed, 20 insertions(+), 14 deletions(-) diff --git a/flake.lock b/flake.lock index 144b3b5..97ff94c 100644 --- a/flake.lock +++ b/flake.lock @@ -573,11 +573,11 @@ "xwayland-satellite-unstable": "xwayland-satellite-unstable" }, "locked": { - "lastModified": 1773329386, - "narHash": "sha256-Xoy4j0NKRrZEAkiFxtTKTsmtUumpvjh3ievyat00eA8=", + "lastModified": 1773390002, + "narHash": "sha256-0RVjh9h0sgPHngxEs/Wd2/xdGsgKgZWjxFu5JsX3ASw=", "owner": "sodiboo", "repo": "niri-flake", - "rev": "815e692569fbb01701770a49ad2fe942cec7f431", + "rev": "adc63b19724247f947385381481effd225a6e2fc", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 946c4fa..ee4edf7 100644 --- a/flake.nix +++ b/flake.nix @@ -171,12 +171,12 @@ group = "wheel"; mode = "0440"; }; - # "openrouter-open.key.age" = { - # file = ./secrets/openrouter-open.key.age; - # owner = "root"; - # group = "wheel"; - # mode = "0440"; - # }; + "openrouter-open.key.age" = { + file = ./secrets/openrouter-open.key.age; + owner = "root"; + group = "wheel"; + mode = "0440"; + }; }; identityPaths = [ "/root/.ssh/id_ed25519" ]; }; diff --git a/home.nix b/home.nix index 2858944..7cc741a 100644 --- a/home.nix +++ b/home.nix @@ -116,12 +116,18 @@ OLLAMA_HOST = "127.0.0.1:11434"; SCCACHE_DIR = "${config.home.homeDirectory}/.cache/sccache"; SCCACHE_SERVER_UDS = "${config.home.homeDirectory}/.cache/sccache/server.sock"; - ### openrouter fun - OPENROUTER_API_KEY = config.age.secrets."openrouter-open" ; - ANTHROPIC_BASE_URL = "https://openrouter.ai/api"; - ANTHROPIC_AUTH_TOKEN = ${config.home.sessionVariables.OPENROUTER_API_KEY}; - ANTHROPIC_API_KEY = ""; }; + sessionVariablesExtra = '' + if [ -r /run/agenix/openrouter-open.key.age ]; then + export OPENROUTER_API_KEY="$(cat /run/agenix/openrouter-open.key.age)" + export ANTHROPIC_AUTH_TOKEN="$OPENROUTER_API_KEY" + + export \ + ANTHROPIC_BASE_URL="https://openrouter.ai/api" \ + ANTHROPIC_API_KEY="" \ + ANTHROPIC_MODEL="openrouter/free" + fi + ''; file = { ".config/waybar/power_menu.xml".text = ''