attofort, attoboxのnixos dotfiles
  • Nix 89.2%
  • Shell 10.8%
Find a file
2026-08-27 08:46:38 +09:00
containers/incus refactor: organize server dotfiles into features 2026-07-31 02:07:01 +09:00
docs fix: restrict sops-nix to dedicated age keys 2026-08-26 19:17:49 +09:00
hosts refactor: name storage roots by host disk 2026-08-21 23:08:20 +09:00
lib refactor: organize server dotfiles into features 2026-07-31 02:07:01 +09:00
modules Allow ytdl-sub to update cookies 2026-08-26 20:36:12 +09:00
secrets chore: re-encrypt all secrets for both hosts 2026-08-27 08:46:38 +09:00
.gitignore feat: add sops-nix secret management 2026-08-26 18:41:37 +09:00
.sops.yaml fix: encrypt secrets for both hosts 2026-08-27 08:43:52 +09:00
flake.lock feat: add sops-nix secret management 2026-08-26 18:41:37 +09:00
flake.nix feat: add sops-nix secret management 2026-08-26 18:41:37 +09:00
README.md refactor: organize server dotfiles into features 2026-07-31 02:07:01 +09:00

server-dotfiles

attofortattobox のヘッドレス NixOS サーバー構成です。アプリケーションとサービスは feature 単位で管理し、各 feature が導入先ホストを宣言します。

構成

パス 役割
flake.nix ホスト、feature、Incus image の出力を組み立てます。
hosts/<host>/ ハードウェア、物理ネットワーク、マウントなど実機固有設定を置きます。
modules/features/ アプリケーションとサービスごとの設定、導入先ホスト、依存関係を置きます。
modules/nixos/ 全サーバーホスト共通の最小基盤を置きます。
containers/incus/ Incus コンテナの bootstrap image を定義します。
docs/ 設計、サービス、初期準備、運用手順を説明します。

初期設定

実機で hardware 設定を生成し、対象ホストのファイルへ置き換えます。

sudo nixos-generate-config --show-hardware-config \
  > hosts/<host>/hardware-configuration.nix
git add hosts/<host>/hardware-configuration.nix

<host>attofort または attobox です。秘密情報はリポジトリへ保存せず、初期準備に従って実機へ配置します。

評価してから build、switch の順で適用します。

nix eval --no-write-lock-file --raw \
  .#nixosConfigurations.<host>.config.system.build.toplevel.drvPath
sudo nixos-rebuild build --flake .#<host>
sudo nixos-rebuild switch --flake .#<host>

詳しい設計と作業手順は docs/ を参照してください。