mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-11-13 12:13:46 +01:00
* feat(agents): use the shell's own dialect; allow 5 s retry backoff Assisted-by: DeepSeek Harness (deepseek-flash) * feat(dsh): make Nushell the only shell Assisted-by: DeepSeek Harness (deepseek-flash) * docs(agents): wait for CI in the background Pushes to a PR often start multi-minute CI runs, and an agent that holds the turn open on a foreground watch reports nothing until it ends. Require the pushed head and running checks to be reported first, the watch to run in the background, and the result to be collected after independent work or after ending the turn. Assisted-by: DeepSeek Harness (deepseek-flash) * docs(agents): keep the shell-handoff rule platform-neutral The global rules carry no Windows assumptions: drop the cmd, pwsh, and wsl handoff examples and keep the POSIX forms plus the dsh refusal. Assisted-by: DeepSeek Harness (deepseek-flash) * docs(dsh): keep the shell-swap docs POSIX-only This repository manages Linux and Darwin hosts, not Windows: drop the Windows handoff examples and terminal-backend wording from dsh.md. The home patch also disabled pwsh-sandbox redundantly because dsh-base already disables that row on POSIX; keep only the active bash-sandbox disable and verify the composed rows with --dump-config. Assisted-by: DeepSeek Harness (deepseek-flash) * docs(agents): keep the global rules runtime-neutral Global rules are loaded by every agent CLI, so they must not describe one runtime's behavior. Drop the dsh-specific sentence and wording while keeping the expectation to prefer Nushell structured pipelines and Python. Runtime behavior stays documented in home/base/tui/agents/dsh.md. Assisted-by: DeepSeek Harness (deepseek-flash) * docs(agents): default shell work to Nushell Keep the Nushell preference explicit in the runtime-neutral global rules, and keep runtime behavior in runtime docs. Bash stays a narrow fallback for tasks Nushell cannot do. Assisted-by: DeepSeek Harness (deepseek-flash) * docs(agents): tighten global-rule scope and CI guidance Keep global rules runtime- and project-neutral, and state that boundary in the file. Remove the duplicated CI turn-steering text in favour of the Communication rule, resolve the watch run before watching instead of relying on gh pr checks --watch alone, name the working-directory parameter generically, and distinguish a bounded retry backoff from a fixed completion wait. Assisted-by: DeepSeek Harness (deepseek-flash) * docs(agents): never estimate a CI run's duration A CI run has no predictable length, so do not turn "it looks short" into a reason to wait. The rule is unconditional: report the head and started checks, start a background watch, and end the turn; collect the result on completion. The eval scenario now uses an unknown duration. Assisted-by: DeepSeek Harness (deepseek-flash) * docs(agents): move maintenance guidance to the README The runtime/project boundary is guidance for editing the rules, not a rule agents need loaded every session. The README's Maintaining global rules section already owns that audience; the loaded rules keep only behavior. Assisted-by: DeepSeek Harness (deepseek-flash) * refactor(dsh): render the home patch from a YAML template Move the home-layer cordis patch into dsh-cordis.patch.yml, substitute the bundle and Nushell store paths with replaceVars, and link the rendered file through home.file.source. This module is the only writer of ~/.dsh/cordis.patch.yml, the current host has no such file, and the profile patch is a separate layer. Assisted-by: DeepSeek Harness (deepseek-flash) * refactor(dsh): install the shell plugin through NUR withPlugins Replace the local runCommand bundle, peer symlink, and home-layer YAML file with the plugin package and dsh.withPlugins from ryan4yin/nur-packages#43. The package wrapper adds a generated --patch overlay after the profile layer, so dsh no longer writes or manages ~/.dsh/cordis.patch.yml. The NUR input is temporarily pinned to the PR branch and its commit; point it back at main once the NUR PR merges. Assisted-by: DeepSeek Harness (deepseek-flash) * refactor(nix): expose the NUR package set as nurPkgs Pass one per-system NUR package set through specialArgs instead of repeating nur-ryan4yin.packages.${pkgs.stdenv.hostPlatform.system} at each call site. The agents, rime, and idols-ruby modules now use the short binding. Assisted-by: DeepSeek Harness (deepseek-flash) * refactor(nix): use nurPkgs in package overlays The overlays receive specialArgs too, so they can use the per-system NUR package set instead of rebuilding the long input path from prev. This leaves only the definition in outputs/default.nix. Assisted-by: DeepSeek Harness (deepseek-flash) * refactor(nix): name the per-system NUR set myNurPkgs Leave room for consuming another NUR repository later, and match the existing mylib/myvars naming. Assisted-by: DeepSeek Harness (deepseek-flash) * chore(dsh): consume the merged NUR package set nur-ryan4yin now points at main after ryan4yin/nur-packages#43 was squash merged; the lock records the merge commit. No branch ref remains. Assisted-by: DeepSeek Harness (deepseek-flash) * fix(dsh): pass the web profile explicitly The withPlugins launcher prepends --patch, which historically prevented dsh from auto-expanding "dsh web" into "--profile web". Pass the profile explicitly in the Just recipe and the verification commands so they work with both plain dsh and the wrapper. Assisted-by: DeepSeek Harness (deepseek-flash) * chore(dsh): pick up the wrapped-profile fix Update nur-ryan4yin to the squash merge that keeps an implicit profile name first, so "dsh web" and "just dsh-web" work through the wrapper again. Assisted-by: DeepSeek Harness (deepseek-flash) * chore(dsh): pick up the plugin peer-link fix Update nur-ryan4yin to the squash merge that links the dsh peer tree at node_modules/@deepseek-ai instead of nesting it one level deeper. This is the import failure that stopped nushell-executor from activating after deploy. Assisted-by: DeepSeek Harness (deepseek-flash)
240 lines
9.1 KiB
Nix
240 lines
9.1 KiB
Nix
{
|
|
description = "Ryan Yin's nix configuration for both NixOS & macOS";
|
|
|
|
##################################################################################################################
|
|
#
|
|
# Want to know Nix in details? Looking for a beginner-friendly tutorial?
|
|
# Check out https://github.com/ryan4yin/nixos-and-flakes-book !
|
|
#
|
|
##################################################################################################################
|
|
|
|
outputs = inputs: import ./outputs inputs;
|
|
|
|
# This is the standard format for flake.nix. `inputs` are the dependencies of the flake,
|
|
# Each item in `inputs` will be passed as a parameter to the `outputs` function after being pulled and built.
|
|
inputs = {
|
|
# There are many ways to reference flake inputs. The most widely used is github:owner/name/reference,
|
|
# which represents the GitHub repository URL + branch/commit-id/tag.
|
|
|
|
# Official NixOS package source, using nixos's unstable branch by default
|
|
# Find git commit hash with build status here(3 jobs per day):
|
|
# https://hydra.nixos.org/jobset/nixpkgs/unstable
|
|
# update via nix flake update nixpkgs --override-input nixpkgs github:NixOS/nixpkgs/<commit-hash>
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
# Pinned to release tag v2.4.0 (not a branch); bump deliberately when needed.
|
|
fcitx5-vinput = {
|
|
url = "github:xifan2333/fcitx5-vinput/v2.4.2";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-26.05";
|
|
# Kept for pinning a package that regressed in newer nixpkgs. Currently only
|
|
# kubernetes-helm uses it (home/base/tui/container.nix); extend or drop this
|
|
# input together with that consumer.
|
|
nixpkgs-2505.url = "github:nixos/nixpkgs/nixos-25.05";
|
|
|
|
# ryan4yin/nixpkgs fork for the `.agents/skills/nixpkgs-patched` workflow. It
|
|
# currently carries no patches (see WORKAROUNDS.md), but `pkgs-patched` is
|
|
# wired in outputs/default.nix so a temporary carry needs no flake edit.
|
|
nixpkgs-patched.url = "github:ryan4yin/nixpkgs/nixos-unstable-patched";
|
|
# get some latest packages from the master branch
|
|
nixpkgs-master.url = "github:nixos/nixpkgs/master";
|
|
# ryan4yin/nixpkgs branch carrying NixOS/nixpkgs#570230 (the Intel NPU
|
|
# compiler and the driver change that loads it). Only aquamarine consumes it,
|
|
# through `pkgs-npu`; drop it once the PR merges.
|
|
nixpkgs-npu.url = "github:ryan4yin/nixpkgs/openvino-npu-compiler";
|
|
# NixOS MicroVMs -- run the VMs directly on the hosts, replacing the former KubeVirt
|
|
microvm = {
|
|
url = "github:microvm-nix/microvm.nix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
# for macos
|
|
# nixpkgs-darwin.url = "github:nixos/nixpkgs/nixpkgs-26.05-darwin";
|
|
nixpkgs-darwin.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
|
nix-darwin = {
|
|
url = "github:lnl7/nix-darwin";
|
|
inputs.nixpkgs.follows = "nixpkgs-darwin";
|
|
};
|
|
|
|
# home-manager, used for managing user configuration
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager/master";
|
|
# url = "github:nix-community/home-manager/release-26.05";
|
|
|
|
# The `follows` keyword in inputs is used for inheritance.
|
|
# Here, `inputs.nixpkgs` of home-manager is kept consistent with the `inputs.nixpkgs` of the current flake,
|
|
# to avoid problems caused by different versions of nixpkgs dependencies.
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
# https://github.com/catppuccin/nix
|
|
# main carries the rust-overlay-style deprecation fix for its vscode
|
|
# package (nodejs -> nodejs-slim).
|
|
catppuccin = {
|
|
url = "github:catppuccin/nix/main";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
lanzaboote = {
|
|
url = "github:nix-community/lanzaboote/v1.1.0";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
inputs.rust-overlay.follows = "rust-overlay";
|
|
};
|
|
|
|
# lanzaboote's pinned rust-overlay still uses the deprecated
|
|
# `stdenv.isLinux`/`stdenv.isDarwin`; follow a newer revision.
|
|
rust-overlay = {
|
|
url = "github:oxalica/rust-overlay";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
preservation = {
|
|
url = "github:nix-community/preservation";
|
|
};
|
|
|
|
# Remote deployment via SSH. Pinned to the same v0.5.0 that nixpkgs ships
|
|
# so the `colmenaHive` output we expose matches the CLI's schema.
|
|
colmena = {
|
|
url = "github:nix-community/colmena/v0.5.0";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
# Reuse the flake's own stable nixpkgs instead of colmena's pinned copy.
|
|
inputs.stable.follows = "nixpkgs-stable";
|
|
};
|
|
|
|
# secrets management
|
|
# Pinned to a release tag (not a branch) so `just up` cannot move it
|
|
# silently; bump deliberately when a new release is needed.
|
|
agenix = {
|
|
url = "github:ryantm/agenix/0.18.0";
|
|
# replaced with a type-safe reimplementation to get a better error message and less bugs.
|
|
# url = "github:ryan4yin/ragenix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
# Reuse the flake's own nix-darwin / home-manager instead of agenix's
|
|
# pinned copies, collapsing duplicate lock nodes.
|
|
inputs.darwin.follows = "nix-darwin";
|
|
inputs.home-manager.follows = "home-manager";
|
|
};
|
|
|
|
disko = {
|
|
url = "github:nix-community/disko/v1.13.0";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
# add git hooks to format nix code before commit
|
|
pre-commit-hooks = {
|
|
url = "github:cachix/git-hooks.nix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
haumea = {
|
|
url = "github:nix-community/haumea/v0.2.2";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
nixpak = {
|
|
url = "github:nixpak/nixpak";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
# Pinned nixpkgs for Blender (5.2 LTS + CUDA/OptiX). Keeping it on a fixed
|
|
# rev stops `just up` from re-bumping this input and triggering a full
|
|
# Blender/CUDA source rebuild; bump the rev deliberately when needed.
|
|
nixpkgs-blender.url = "github:nixos/nixpkgs/4b8338e3113dc41bcf7695f56dc372107b7ff4c9";
|
|
|
|
nixos-apple-silicon = {
|
|
url = "github:nix-community/nixos-apple-silicon";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
# AI coding agents
|
|
llm-agents.url = "github:numtide/llm-agents.nix";
|
|
|
|
# terminal window manager / multiplexer; nixpkgs lags behind upstream,
|
|
# so track the upstream flake.
|
|
tuios = {
|
|
url = "github:Gaurav-Gosain/tuios/v0.10.1";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
# -------------- Gaming ---------------------
|
|
|
|
nix-gaming = {
|
|
url = "github:fufexan/nix-gaming";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
# x86/x86_64 emulation on 16K-page ARM64 (Apple Silicon). FEX cannot run
|
|
# natively with 16K pages, so this wraps FEX in a 4K-page muvm microVM and
|
|
# exposes an `x86pkgs` set plus Steam/Wine launchers. Used by shoukei; see
|
|
# hosts/12kingdoms-shoukei and WORKAROUNDS.md (WA-021).
|
|
#
|
|
# Pinned to our fork of rowanG077/nix-x86-on-aarch64 at the reviewed commit
|
|
# 5d69793a. To update, fetch upstream into the fork, review the new commits,
|
|
# then bump the rev here deliberately. Do not track the fork's default branch:
|
|
# a GitHub "Sync fork" fast-forward would pull unreviewed changes.
|
|
nix-x86-on-aarch64 = {
|
|
url = "github:ryan4yin/nix-x86-on-aarch64/5d69793a1c8b31d724fccd9b6acaa33587c923b3";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
######################## Some non-flake repositories #########################################
|
|
|
|
nu_scripts = {
|
|
url = "github:ryan4yin/nu_scripts";
|
|
flake = false;
|
|
};
|
|
|
|
# Global agent skills, linked into ~/.agents/skills by
|
|
# home/base/tui/agents/skills.nix. The ryan4yin forks track main; a fork sync
|
|
# pulls upstream changes, so review the lock diff before deploying it.
|
|
mattpocock-skills = {
|
|
url = "github:ryan4yin/mattpocock-skills";
|
|
flake = false;
|
|
};
|
|
i-have-adhd = {
|
|
url = "github:ryan4yin/i-have-adhd";
|
|
flake = false;
|
|
};
|
|
# Third-party skills pinned to a tag or commit; bump deliberately.
|
|
humanizer = {
|
|
url = "github:blader/humanizer/v3.1.0";
|
|
flake = false;
|
|
};
|
|
ponytail = {
|
|
url = "github:DietrichGebert/ponytail/v5.1.0";
|
|
flake = false;
|
|
};
|
|
######################## My own repositories #########################################
|
|
|
|
# my private secrets, it's a private repository, you need to replace it with your own.
|
|
# use ssh protocol to authenticate via ssh-agent/ssh-key, and shallow clone to save time
|
|
mysecrets = {
|
|
url = "git+ssh://git@github.com/ryan4yin/nix-secrets.git?shallow=1";
|
|
flake = false;
|
|
};
|
|
|
|
my-asahi-firmware = {
|
|
url = "git+ssh://git@github.com/ryan4yin/asahi-firmware.git?shallow=1";
|
|
flake = false;
|
|
};
|
|
|
|
# my wallpapers
|
|
wallpapers = {
|
|
url = "github:ryan4yin/wallpapers";
|
|
flake = false;
|
|
};
|
|
|
|
# Personal NUR packages.
|
|
nur-ryan4yin = {
|
|
url = "github:ryan4yin/nur-packages";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
# Wayland <-> X11 clipboard sync daemon for xwayland-satellite (niri)
|
|
pyclipsync = {
|
|
url = "github:ryan4yin/pyclipsync/v0.1.3";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
}
|