スキル一覧に戻る
DaRacci

building

by DaRacci

An idiots nix config

17🍴 0📅 2026年1月24日
GitHubで見るManusで実行

SKILL.md


name: building description: Build and evaluate NixOS and Home-Manager configurations

Building

Build Commands

CommandPurpose
nix build .#nixosConfigurations.<host>.config.system.build.toplevelBuild a host's NixOS system
nix build .#homeConfigurations.<user>@<host>.activationPackageBuild a Home-Manager activation
nix fmtFormat code and check syntax
nix flake checkEvaluate all configurations and run linters
nix flake showDisplay available outputs
nix developOpen development shell
nix develop --command trueTest that devShell can be entered

DevEnv Requirement

This repository uses devenv for devShells and checks. You must provide the devenv-root input override for nix flake check and nix develop:

nix flake check --override-input devenv-root "file+file://$PWD/.devenv/root"

nix develop --override-input devenv-root "file+file://$PWD/.devenv/root"

Common Build Patterns

Build a specific host

# Build nixdev server
nix build .#nixosConfigurations.nixdev.config.system.build.toplevel

# Build nixmi desktop
nix build .#nixosConfigurations.nixmi.config.system.build.toplevel

Build a user's home configuration

# Build racci's config on nixmi
nix build .#homeConfigurations."racci@nixmi".activationPackage

Evaluate without building

# Check if configuration evaluates
nix eval .#nixosConfigurations.nixdev.config.system.build.toplevel --apply 'x: "ok"'

# Get a specific option value
nix eval .#nixosConfigurations.nixdev.config.networking.hostName

Format specific files

# Format changed files
nix fmt path/to/file.nix

# Format multiple files
nix fmt modules/nixos/services/*.nix

Troubleshooting Builds

If a build fails:

  1. Check the error message for the failing derivation
  2. Try nix log <drv> to see build logs
  3. Use --show-trace for evaluation errors: nix build .#... --show-trace
  4. For infinite recursion, check for circular imports or option definitions

スコア

総合スコア

60/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です