mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-11-13 12:13:36 +01:00
refactor(overlays): get NUR packages from the nur-ryan4yin overlay
myNurPkgs evaluated a second nixpkgs just for four packages. Apply the NUR repo's own overlay instead, so they come from the host's pkgs. Darwin's pkgs now gets nixpkgsConfig too: it set nixpkgs.pkgs, which ignores nixpkgs.config, so only myNurPkgs carried the npm mirror there. Assisted-by: Claude Code (claude-opus-5-5)
This commit is contained in:
1 parent
70d8bd6791
commit
c8bbeb708d
11 files changed
+18
-40
No files matched your search
@@ -1,13 +1,12 @@
|
||||
{
|
||||
lib,
|
||||
myNurPkgs,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
# flypy (小鹤音形) rime data from nur-ryan4yin (`pkgs/rime-data-flypy`). The
|
||||
# package stays pristine; personal preferences live in flypy.custom.yaml.
|
||||
rime-data-flypy = myNurPkgs.rime-data-flypy;
|
||||
rime-data-flypy = pkgs.rime-data-flypy;
|
||||
# Personal Rime customisation, layered by Rime on top of the shared rime-data.
|
||||
custom = ./flypy.custom.yaml;
|
||||
# Manually maintained user dictionary (custom phrases, symbols, missing
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{
|
||||
pkgs,
|
||||
llm-agents,
|
||||
myNurPkgs,
|
||||
dsh-nu,
|
||||
...
|
||||
}:
|
||||
@@ -11,7 +10,7 @@ let
|
||||
# supplies the dsh installation it plugs into.
|
||||
dshNu = dsh-nu.lib.mkDshNuPackage {
|
||||
inherit pkgs;
|
||||
dsh = myNurPkgs.dsh;
|
||||
inherit (pkgs) dsh;
|
||||
};
|
||||
in
|
||||
{
|
||||
@@ -23,7 +22,7 @@ in
|
||||
# dsh from nur-packages: llm-agents.nix's dsh cannot boot on nixpkgs node
|
||||
# (node-addon-require-builtin probe), this one shims it. The Nushell-only
|
||||
# plugin rides in through the package's withPlugins wrapper.
|
||||
(myNurPkgs.dsh.withPlugins [ dshNu ])
|
||||
(pkgs.dsh.withPlugins [ dshNu ])
|
||||
|
||||
# Docs lookup CLI behind the find-docs skill (agents/skills/find-docs). The skill's flags are
|
||||
# written against this package, not against upstream's npx instructions.
|
||||
|
||||
@@ -45,7 +45,7 @@ tree the agent reads, so it stays.
|
||||
- the generated `computer-use-init` script (exec'd by i3) publishes `DISPLAY`/`XDG_SESSION_TYPE` to
|
||||
the systemd user manager, clears any stale `WAYLAND_DISPLAY`, and enables the AT-SPI bridge via a
|
||||
gsettings key.
|
||||
- Drivers live in `overlays/cua-driver.nix` and `overlays/computer-use-linux.nix`.
|
||||
- Drivers come from the nur-ryan4yin overlay (`overlays/nur-ryan4yin.nix`).
|
||||
- Host wiring: `home/hosts/linux/idols-ruby.nix`, `home/hosts/linux/idols-kana.nix`,
|
||||
`hosts/idols-ruby/computer-use.nix`.
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ in
|
||||
xvfb # headless X server
|
||||
]
|
||||
++ [
|
||||
# MCP server / CLI that drives the desktop (see overlays/computer-use-linux.nix).
|
||||
# MCP server / CLI that drives the desktop (see overlays/nur-ryan4yin.nix).
|
||||
pkgs.computer-use-linux
|
||||
]
|
||||
++ lib.optional cfg.vnc pkgs.x11vnc
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{
|
||||
pkgs,
|
||||
llm-agents,
|
||||
myNurPkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
@@ -87,6 +86,6 @@ in
|
||||
agentPackages.pi
|
||||
# dsh from nur-packages: llm-agents.nix's dsh cannot boot on nixpkgs node
|
||||
# (node-addon-require-builtin probe), this one shims it.
|
||||
myNurPkgs.dsh
|
||||
pkgs.dsh
|
||||
];
|
||||
}
|
||||
+7
-10
@@ -17,16 +17,13 @@ nix-darwin.lib.darwinSystem {
|
||||
modules =
|
||||
darwin-modules
|
||||
++ [
|
||||
(
|
||||
{ lib, ... }:
|
||||
{
|
||||
nixpkgs.pkgs = import nixpkgs-darwin {
|
||||
inherit system; # refer the `system` parameter form outer scope recursively
|
||||
# To use chrome, we need to allow the installation of non-free software
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
}
|
||||
)
|
||||
{
|
||||
nixpkgs.pkgs = import nixpkgs-darwin {
|
||||
inherit system; # refer the `system` parameter form outer scope recursively
|
||||
# `nixpkgs.config` is ignored once `nixpkgs.pkgs` is set.
|
||||
config = specialArgs.nixpkgsConfig;
|
||||
};
|
||||
}
|
||||
]
|
||||
++ (lib.optionals ((lib.lists.length home-modules) > 0) [
|
||||
home-manager.darwinModules.home-manager
|
||||
|
||||
@@ -73,16 +73,6 @@ let
|
||||
cudaCapabilities = [ "8.9" ];
|
||||
};
|
||||
};
|
||||
# NUR packages for this system; modules use `myNurPkgs.dsh` instead of
|
||||
# repeating `nur-ryan4yin.packages.${pkgs.stdenv.hostPlatform.system}`.
|
||||
# Instantiate them with the same Nixpkgs policy as the host so npm
|
||||
# fetchers inside NUR packages also use the mirror.
|
||||
myNurPkgs = import "${inputs.nur-ryan4yin}" {
|
||||
pkgs = import inputs.nixpkgs {
|
||||
inherit system;
|
||||
config = nixpkgsConfig;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# This is the args for all the haumea modules in this folder.
|
||||
|
||||
+3
-5
@@ -11,8 +11,7 @@ through [Overlays - NixOS & Flakes Book](https://nixos-and-flakes.thiscute.world
|
||||
overlays/
|
||||
├── README.md
|
||||
├── default.nix # Entrypoint for all overlays
|
||||
├── computer-use-linux.nix # computer-use-linux from ryan4yin/nur-packages
|
||||
└── cua-driver.nix # cua-driver from ryan4yin/nur-packages
|
||||
└── nur-ryan4yin.nix # ryan4yin/nur-packages
|
||||
```
|
||||
|
||||
## Components
|
||||
@@ -23,6 +22,5 @@ The entrypoint imports every overlay file in this directory and applies it to th
|
||||
|
||||
### 2. Package overlays
|
||||
|
||||
- `computer-use-linux.nix`: exposes `computer-use-linux` from the `nur-ryan4yin` flake input.
|
||||
- `cua-driver.nix`: exposes `cua-driver` from the `nur-ryan4yin` flake input (used by the
|
||||
computer-use VMs).
|
||||
- `nur-ryan4yin.nix`: applies the `nur-ryan4yin` input's own overlay, which adds `dsh`,
|
||||
`rime-data-flypy`, `computer-use-linux` and `cua-driver` to `pkgs`.
|
||||
@@ -1,3 +0,0 @@
|
||||
{ myNurPkgs, ... }: _final: _prev: {
|
||||
computer-use-linux = myNurPkgs.computer-use-linux;
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
{ myNurPkgs, ... }: _final: _prev: {
|
||||
cua-driver = myNurPkgs.cua-driver;
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
# dsh, rime-data-flypy, computer-use-linux and cua-driver from ryan4yin/nur-packages.
|
||||
{ nur-ryan4yin, ... }: import "${nur-ryan4yin}/overlay.nix"
|
||||
Reference in new issue
Block a user