Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
087225be45
|
|||
|
25c32cb65d
|
|||
|
4fc2befee5
|
|||
|
33723a5315
|
Generated
+21
@@ -253,6 +253,26 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-skills": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1775452536,
|
||||
"narHash": "sha256-1MjzL/U5OtALBmsel4YHVSK9jr2c/YP4eXfi7lA5C+o=",
|
||||
"owner": "sudosubin",
|
||||
"repo": "nix-skills",
|
||||
"rev": "c2d1958a5cdd7ee83f552c046fbc7cb43e8171e4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "sudosubin",
|
||||
"repo": "nix-skills",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-sweep": {
|
||||
"inputs": {
|
||||
"cf": "cf",
|
||||
@@ -404,6 +424,7 @@
|
||||
"home-manager": "home-manager",
|
||||
"lanzaboote": "lanzaboote",
|
||||
"nix-flatpak": "nix-flatpak",
|
||||
"nix-skills": "nix-skills",
|
||||
"nix-sweep": "nix-sweep",
|
||||
"nixos-hardware": "nixos-hardware",
|
||||
"nixpkgs": "nixpkgs",
|
||||
|
||||
@@ -39,6 +39,10 @@
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.linux-ntfs.url = "github:Lumpiasty/linux-ntfs/main";
|
||||
};
|
||||
nix-skills = {
|
||||
url = "github:sudosubin/nix-skills";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixos-hardware, ... }@inputs:
|
||||
|
||||
+17
-10
@@ -60,16 +60,6 @@
|
||||
nodejs_24
|
||||
codex
|
||||
claude-code
|
||||
(
|
||||
# Wrapping opencode to set the OPENCODE_ENABLE_EXA environment variable
|
||||
runCommand "opencode" {
|
||||
buildInputs = [ makeWrapper ];
|
||||
} ''
|
||||
mkdir -p $out/bin
|
||||
makeWrapper ${pkgs.opencode}/bin/opencode $out/bin/opencode \
|
||||
--set OPENCODE_ENABLE_EXA "1"
|
||||
''
|
||||
)
|
||||
winbox4
|
||||
amdgpu_top
|
||||
dua
|
||||
@@ -128,5 +118,22 @@
|
||||
fi
|
||||
''
|
||||
);
|
||||
|
||||
programs.opencode = {
|
||||
enable = true;
|
||||
package = (
|
||||
# Wrapping opencode to set the OPENCODE_ENABLE_EXA environment variable
|
||||
pkgs.runCommand "opencode" {
|
||||
buildInputs = [ pkgs.makeWrapper ];
|
||||
} ''
|
||||
mkdir -p $out/bin
|
||||
makeWrapper ${pkgs.opencode}/bin/opencode $out/bin/opencode \
|
||||
--set OPENCODE_ENABLE_EXA "1"
|
||||
''
|
||||
);
|
||||
skills = with pkgs.skills; {
|
||||
caveman = majiayu000."claude-skill-registry".caveman + "/";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
peerix,
|
||||
acer-wmi-ext,
|
||||
ntfsplus,
|
||||
nix-skills,
|
||||
...
|
||||
}:
|
||||
hardwareConfig: hostConfig:
|
||||
@@ -26,6 +27,7 @@ nixpkgs.lib.nixosSystem {
|
||||
nixpkgs.overlays = [
|
||||
claude-code.overlays.default
|
||||
acer-wmi-ext.overlays.default
|
||||
nix-skills.overlays.default
|
||||
];
|
||||
nix.settings = {
|
||||
substituters = [ "https://claude-code.cachix.org" ];
|
||||
|
||||
@@ -2,9 +2,8 @@
|
||||
|
||||
{
|
||||
config = lib.mkIf config.boot.zfs.enabled {
|
||||
# Set ARC max to 5% of physical RAM at boot
|
||||
systemd.services."zfs-arc-limit" = {
|
||||
description = "Set ZFS ARC max to 5% of physical RAM";
|
||||
description = "Set ZFS ARC max to 20% of physical RAM";
|
||||
# Ensure the module is loaded before we write to /sys
|
||||
after = [ "systemd-modules-load.service" ];
|
||||
# Run early, but it’s fine if ZFS has already imported; the limit still applies
|
||||
@@ -15,8 +14,8 @@
|
||||
# Total RAM in kB
|
||||
mem_kb=$(awk '/MemTotal:/ {print $2}' /proc/meminfo)
|
||||
echo "DEBUG: Total RAM: $mem_kb kB"
|
||||
# 5%, in bytes
|
||||
arc_max_bytes=$(( mem_kb * 1024 / 100 * 5 ))
|
||||
# 20%, in bytes
|
||||
arc_max_bytes=$(( mem_kb * 1024 / 100 * 20 ))
|
||||
echo "DEBUG: Setting ZFS ARC max to: $arc_max_bytes bytes"
|
||||
param="/sys/module/zfs/parameters/zfs_arc_max"
|
||||
if [ -w "$param" ]; then
|
||||
|
||||
Reference in New Issue
Block a user