feat(radicale): カレンダー・タスク・連絡先を自宅の Radicale に集約する - #375
Open
gapul wants to merge 1 commit into
Open
Conversation
gapul
added a commit
that referenced
this pull request
Aug 20, 2026
これまで secrets/secrets.yaml 1本を mac / laptop / WSL の3ホストが同じ secrets.nix 経由で読んでいたため、Linux 側のリビルドでも Xcode の Apple ID と keystats の署名鍵がディスクに書き出されていた。どちらもそこでは使えない資格情報。 common / darwin / homelab の3ファイルに分け、.sops.yaml でファイルごとに受信者を 変えた。darwin.yaml は mac のホスト鍵まで、homelab.yaml は人間の鍵だけが開ける。 分割は「元ファイルの全リーフパスが出力のどれかにちょうど1回現れる」ことを検証して から実施した (unified_calendar/admin_token の振り分け漏れをこれで検出)。 ホスト鍵は .sops.yaml に受信者として入れてあるが、この PR ではまだ使わない。 home-manager の sops はユーザ権限で動き、/etc/ssh/ssh_host_ed25519_key は 0600 root:wheel なので、ホスト鍵での復号はシステム側 sops でないと届かない。 radicale (username/password) は作業ツリーに未コミットで残っていたものを取り込んだ。 PR #375 の平たい radicale_password はこれに置き換わる。
gapul
force-pushed
the
feat/radicale-credential
branch
from
August 20, 2026 12:30
7cf9b5b to
52ff2cc
Compare
Owner
Author
|
#393 (sops のホスト単位分割) の上に rebase して、base を 解決した衝突
合わせて直したもの手元の作業ツリーに未コミットで残っていた
確認
|
gapul
added a commit
that referenced
this pull request
Aug 21, 2026
これまで secrets/secrets.yaml 1本を mac / laptop / WSL の3ホストが同じ secrets.nix 経由で読んでいたため、Linux 側のリビルドでも Xcode の Apple ID と keystats の署名鍵がディスクに書き出されていた。どちらもそこでは使えない資格情報。 common / darwin / homelab の3ファイルに分け、.sops.yaml でファイルごとに受信者を 変えた。darwin.yaml は mac のホスト鍵まで、homelab.yaml は人間の鍵だけが開ける。 分割は「元ファイルの全リーフパスが出力のどれかにちょうど1回現れる」ことを検証して から実施した (unified_calendar/admin_token の振り分け漏れをこれで検出)。 ホスト鍵は .sops.yaml に受信者として入れてあるが、この PR ではまだ使わない。 home-manager の sops はユーザ権限で動き、/etc/ssh/ssh_host_ed25519_key は 0600 root:wheel なので、ホスト鍵での復号はシステム側 sops でないと届かない。 radicale (username/password) は作業ツリーに未コミットで残っていたものを取り込んだ。 PR #375 の平たい radicale_password はこれに置き換わる。
Radicale は6月から動いていたがコレクションが空で、パスワードも sops に無く、 実質使われていなかった。3種類のコレクションを作り、資格情報を宣言に載せて、 calcurse の同期先を Google カレンダーから移す。 サーバ側(手作業・homeserver は sops 非導入): /gapul/calendar VEVENT /gapul/tasks VTODO /gapul/contacts addressbook /var/lib/homelab/radicale/config/users を bcrypt で作り直し(旧版は .bak) calcurse の設定キーが古い書式のままで、いまの calcurse-caldav は起動即エラーに なっていた。Hostname / Path / HTTPS に直し、既定が DryRun = Yes なので明示的に 無効化する。コメント行も設定として読まれるため、旧キー名は書かない。
gapul
force-pushed
the
feat/radicale-credential
branch
from
August 21, 2026 01:52
52ff2cc to
1e8a3e0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
なぜ
Radicale は 6/28 から homeserver で動いていたが、コレクションが1つも無く、パスワードも sops に入っていない状態だった。
nix/mobile/ios-profiles.nixに構成プロファイルまで用意されていたのに、実質使われていない。iCloud と Google の両方から連絡先・カレンダー・リマインダーを引き上げる先がここなので、まず器を作る。サーバ側(手作業)
homeserver は sops 非導入で、秘密は
/var/lib/secrets/に手置きする方針。Radicale の htpasswd も同じ扱いにした。/var/lib/homelab/radicale/config/usersを bcrypt で作り直し(旧版はusers.bak-20260816)。実測
3種類とも PUT / GET / DELETE が通り、日本語も往復した。
calcurse の同期先を移す
ServerAddress = www.google.comからdav.gapul.netへ。あわせて設定キーが古い書式のままで壊れていたのを直す。いまの calcurse-caldav は
[General] SyncDirも[CalDAV] ServerAddressも受け付けず、Unexpected config key in section General: SyncDirで即死する。つまり Google 時代からこの同期は動いていなかった。正しくは[General]のHostname/Path/HTTPS。罠が2つ。
DryRun = Yesで、明示的にNoにしないと接続だけして何も同期しない実測
サーバに置いた予定が calcurse 側に降りることを確認。
残り
データ本体の移行(iCloud / Google からの連絡先・カレンダー・リマインダー)は Takeout と privacy.apple.com の書き出し待ち。iPhone / Mac へのアカウント追加も未了。