Initial implementation of arca, a LUKS volume manager.
Go CLI using cobra with mount, unmount, status, and init subcommands. Unlocks via udisks2 D-Bus (passphrase/keyfile) or cryptsetup (FIDO2/TPM2) with ordered method fallback. Includes NixOS-specific LD_LIBRARY_PATH injection for systemd cryptsetup token plugins. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
27
internal/udisks/types.go
Normal file
27
internal/udisks/types.go
Normal file
@@ -0,0 +1,27 @@
|
||||
package udisks
|
||||
|
||||
import "github.com/godbus/dbus/v5"
|
||||
|
||||
const (
|
||||
busName = "org.freedesktop.UDisks2"
|
||||
objectPrefix = "/org/freedesktop/UDisks2"
|
||||
|
||||
ifaceObjectManager = "org.freedesktop.DBus.ObjectManager"
|
||||
ifaceBlock = "org.freedesktop.UDisks2.Block"
|
||||
ifaceEncrypted = "org.freedesktop.UDisks2.Encrypted"
|
||||
ifaceFilesystem = "org.freedesktop.UDisks2.Filesystem"
|
||||
)
|
||||
|
||||
// BlockDevice represents a udisks2 block device.
|
||||
type BlockDevice struct {
|
||||
ObjectPath dbus.ObjectPath
|
||||
DevicePath string // e.g., "/dev/sda1"
|
||||
UUID string
|
||||
HasEncrypted bool
|
||||
HasFilesystem bool
|
||||
CryptoBackingDevice dbus.ObjectPath
|
||||
}
|
||||
|
||||
func noOptions() map[string]dbus.Variant {
|
||||
return make(map[string]dbus.Variant)
|
||||
}
|
||||
Reference in New Issue
Block a user