From cf5a2f46f0167c8495d28de5b1364c8bc460b6d0 Mon Sep 17 00:00:00 2001 From: sommerfeld Date: Fri, 19 Jun 2026 17:57:23 +0100 Subject: Migrate VM dotfiles to chezmoi Move VM dotfile deployment out of Home Manager and into chezmoi with a machineRole guard. Add VM recipes for applying chezmoi state and restarting the Nix GnuPG agent. Make host-only hooks no-op on the VM and render container storage per role. --- dot_config/containers/storage.conf | 17 ----------------- dot_config/containers/storage.conf.tmpl | 32 ++++++++++++++++++++++++++++++++ dot_config/nvim/lua/plugins/ai.lua | 6 +++--- 3 files changed, 35 insertions(+), 20 deletions(-) delete mode 100644 dot_config/containers/storage.conf create mode 100644 dot_config/containers/storage.conf.tmpl (limited to 'dot_config') diff --git a/dot_config/containers/storage.conf b/dot_config/containers/storage.conf deleted file mode 100644 index 3ba957e..0000000 --- a/dot_config/containers/storage.conf +++ /dev/null @@ -1,17 +0,0 @@ -# Rootless podman storage configuration. -# -# Uses the native kernel btrfs graph driver — much faster than fuse-overlayfs -# (especially `podman commit`) because layers are real btrfs subvolumes with -# CoW snapshots, no FUSE userspace round-trip. -# -# Switching driver requires a one-time `podman system reset --force`; the -# overlay/fuse-overlay on-disk layout is incompatible. See the migration -# helper at the dotfiles repo root (migrate-podman-to-btrfs.sh). -# -# graphroot/runroot left at defaults: -# graphroot = $XDG_DATA_HOME/containers/storage -# runroot = $XDG_RUNTIME_DIR/containers -# both are on btrfs in this setup (root fs is btrfs). - -[storage] -driver = "btrfs" diff --git a/dot_config/containers/storage.conf.tmpl b/dot_config/containers/storage.conf.tmpl new file mode 100644 index 0000000..62dd35c --- /dev/null +++ b/dot_config/containers/storage.conf.tmpl @@ -0,0 +1,32 @@ +{{- $machineRole := default "host" (index . "machineRole") -}} +{{- if eq $machineRole "vm" -}} +# Rootless podman storage configuration. +# +# The VM uses ext4, so use the kernel overlay driver. runroot/graphroot default +# to $XDG_RUNTIME_DIR/containers and $XDG_DATA_HOME/containers/storage. + +[storage] +driver = "overlay" + +[storage.options.overlay] +# Kernel >=5.13 supports rootless overlay natively on the VM, so leave +# mount_program unset and avoid fuse-overlayfs. +{{- else -}} +# Rootless podman storage configuration. +# +# Uses the native kernel btrfs graph driver — much faster than fuse-overlayfs +# (especially `podman commit`) because layers are real btrfs subvolumes with +# CoW snapshots, no FUSE userspace round-trip. +# +# Switching driver requires a one-time `podman system reset --force`; the +# overlay/fuse-overlay on-disk layout is incompatible. See the migration +# helper at the dotfiles repo root (migrate-podman-to-btrfs.sh). +# +# graphroot/runroot left at defaults: +# graphroot = $XDG_DATA_HOME/containers/storage +# runroot = $XDG_RUNTIME_DIR/containers +# both are on btrfs in this setup (root fs is btrfs). + +[storage] +driver = "btrfs" +{{- end }} diff --git a/dot_config/nvim/lua/plugins/ai.lua b/dot_config/nvim/lua/plugins/ai.lua index 6ebc6f5..81a8307 100644 --- a/dot_config/nvim/lua/plugins/ai.lua +++ b/dot_config/nvim/lua/plugins/ai.lua @@ -1,8 +1,8 @@ -- Prefer the chezmoi-pinned Node 24 (host has Arch's system node 26, which -- breaks copilot-language-server — see --- ~/.local/share/chezmoi/run_onchange_after_install-copilot-node.sh). Fall --- back to `node` on PATH for hosts that don't run chezmoi (remote-dev VM --- via Nix Home-Manager, where home.nix pins nodejs_24 in the profile). +-- ~/.local/share/chezmoi/run_onchange_after_install-copilot-node.sh.tmpl). +-- Fall back to `node` on PATH on the VM, where Nix pins nodejs_24 in the +-- profile. local pinned_node = vim.fs.joinpath( vim.env.XDG_DATA_HOME or (vim.env.HOME .. "/.local/share"), "copilot-node/bin/node" -- cgit v1.3.1