원클릭으로
packages
Create custom packages and overlays
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Create custom packages and overlays
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | packages |
| description | Create custom packages and overlays |
pkgs/
default.nix # Central registry - exports all packages
<package-name>/ # Each package in its own directory
default.nix # Package definition
[other files] # Scripts, patches, deps.json, etc.
python/ # Python library packages
pyarlo.nix
pyuptimekuma.nix
mkdir -p pkgs/my-package
# pkgs/my-package/default.nix
{
lib,
stdenv,
fetchFromGitHub,
}:
stdenv.mkDerivation rec {
pname = "my-package";
version = "1.0.0";
src = fetchFromGitHub {
owner = "example";
repo = "my-package";
rev = "v${version}";
hash = "sha256-AAAA...";
};
meta = with lib; {
description = "My custom package";
license = licenses.mit;
platforms = platforms.linux;
};
}
pkgs/default.nix# pkgs/default.nix
{ pkgs, ... }:
{
my-package = pkgs.callPackage ./my-package { };
}
{
writeShellApplication,
gawk,
coreutils,
}:
writeShellApplication {
name = "my-script";
text = builtins.readFile ./my-script.sh;
runtimeInputs = [ gawk coreutils ];
}
{
lib,
stdenv,
fetchurl,
autoPatchelfHook,
}:
stdenv.mkDerivation rec {
pname = "my-binary";
version = "1.0.0";
src = fetchurl {
url = "https://example.com/my-binary-${version}.tar.gz";
hash = "sha256-AAAA...";
};
nativeBuildInputs = [ autoPatchelfHook ];
installPhase = ''
install -Dm755 my-binary $out/bin/my-binary
'';
}
{
python3Packages,
fetchFromGitHub,
}:
python3Packages.buildPythonApplication rec {
pname = "my-app";
version = "1.0.0";
pyproject = true;
src = fetchFromGitHub { ... };
build-system = [ python3Packages.setuptools ];
dependencies = [ python3Packages.requests ];
meta = { ... };
}
# pkgs/python/my-lib.nix
{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
requests,
}:
buildPythonPackage rec {
pname = "my-lib";
version = "1.0.0";
pyproject = true;
src = fetchFromGitHub { ... };
build-system = [ setuptools ];
dependencies = [ requests ];
pythonImportsCheck = [ "my_lib" ];
meta = { ... };
}
Register Python packages with:
# pkgs/default.nix
my-lib = pkgs.python3Packages.callPackage ./python/my-lib.nix { };
{
python3Packages,
}:
let
inherit (python3Packages) buildPythonApplication;
in
{
my-server = buildPythonApplication { ... };
my-client = buildPythonApplication { ... };
}
Register with:
inherit (pkgs.callPackage ./my-package { }) my-server my-client;
Packages are exposed via overlays/default.nix:
additions = final: prev:
import ../pkgs {
inherit inputs lib;
pkgs = final;
};
This makes packages available as pkgs.<package-name>.
Add automatic update support:
passthru.updateScript = nix-update-script {
extraArgs = [ "--flake" ];
};
Then update with:
nix-update --flake <package-name>
Create and modify NixOS and Home-Manager modules
Hardens systemd services against security issues using sandboxing, capability restriction, and syscall filtering. Use when creating or modifying systemd services, writing NixOS modules with systemd.services, reviewing service security, or whenever a serviceConfig block is involved. Ensures services follow defense-in-depth principles with minimal privilege.
Write Nix code using repo conventions
Write and review Conventional Commits commit messages (v1.0.0) for semantic versioning and changelogs. Use when drafting git commit messages, PR titles, release notes, or enforcing conventional commit format like `type(scope): subject`, `BREAKING CHANGE`, footers, and `revert`.
Manages version control with Jujutsu (jj), including rebasing, conflict resolution, and Git interop. Use when tracking changes, navigating history, squashing/splitting commits, or pushing to Git remotes.
Manage background jobs, capture command output, and handle session multiplexing. Use when running long commands, capturing output from detached processes, or managing concurrent tasks in headless environments.