Skip to content

Conversation

flexiondotorg
Copy link
Member

  • Add separate vault partition with strong encryption for storing LUKS keys
  • Implement key-file based unlocking for secondary partitions instead of password
  • Add openssh to install-anywhere runtime dependencies
  • Update disk configurations for maul, phasma and vader systems
  • Add new disk configuration files for vader and phasma
  • Fix chown permissions after nixos-anywhere installation
  • Improve encryption parameters with appropriate memory and iteration settings
    refactor(disk): replace mdraid with luks+btrfs for storage setup

- Add separate vault partition with strong encryption for storing LUKS keys
- Implement key-file based unlocking for secondary partitions instead of password
- Add openssh to install-anywhere runtime dependencies
- Update disk configurations for maul, phasma and vader systems
- Add new disk configuration files for vader and phasma
- Fix chown permissions after nixos-anywhere installation
- Improve encryption parameters with appropriate memory and iteration settings
refactor(disk): replace mdraid with luks+btrfs for storage setup
@flexiondotorg flexiondotorg requested a review from Copilot June 26, 2025 19:07
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Refactors disk configurations to replace mdraid with LUKS+Btrfs, adds a dedicated encrypted vault partition and key-file–based unlocking, and updates provisioning scripts with keyfile support and new runtime dependencies.

  • Introduce a separate /vault partition with custom LUKS parameters and ext2 filesystem
  • Migrate snapshot and home RAID-0 setups from mdraid to LUKS+Btrfs across vader, phasma, and maul
  • Enhance install-system/install-anywhere scripts to generate, deploy, and secure key files; add openssh to runtimeInputs

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
nixos/vader/disks.nix Add vault partition and update LUKS/Btrfs settings
nixos/vader/disks-snapshot.nix Replace mdraid snapshots with LUKS and Btrfs RAID-0
nixos/vader/disks-home.nix Migrate home RAID to LUKS and Btrfs
nixos/phasma/disks.nix Add vault partition and revise LUKS/Btrfs parameters
nixos/phasma/disks-snapshot.nix Convert snapshot RAID to LUKS and Btrfs
nixos/phasma/disks-home.nix Switch home RAID to LUKS and Btrfs
nixos/maul/disks.nix Update vault and crypt partitions with LUKS settings
nixos/_mixins/scripts/install-system/install-system.sh Generate and install keyfiles for encrypted volumes
nixos/_mixins/scripts/install-anywhere/install-anywhere.sh Copy LUKS key during “install-anywhere” provisioning
nixos/_mixins/scripts/install-anywhere/default.nix Add openssh to install-anywhere runtime dependencies
Comments suppressed due to low confidence (2)

nixos/maul/disks.nix:82

  • The comment states AES-XTS with 512-bit keys, but the --key-size=256 argument is used. Align the comment with the actual key size or update the --key-size to match your security requirements.
                # AES-XTS with 512-bit keys provides optimal security-performance balance.

nixos/_mixins/scripts/install-system/install-system.sh:117

  • Using grep -q "keyFile" may match any occurrence (including root LUKS slots) and trigger keyfile generation prematurely. Consider matching a more specific pattern (e.g., --keyFile in a particular partition block) or using a YAML/JSON parser to detect the intended keyFile entry.
if grep -q "keyFile" "nixos/$TARGET_HOST/disks.nix"; then

Comment on lines +60 to +66
extraFormatArgs = [
"--cipher=serpent-xts-plain64"
"--hash=sha512"
"--iter-time=3000"
"--key-size=256"
"--pbkdf-memory=4194304"
"--sector-size=4096"
Copy link
Preview

Copilot AI Jun 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The LUKS extraFormatArgs block is repeated across multiple configurations. Extract common parameters into a variable or function to reduce duplication and simplify future adjustments.

Suggested change
extraFormatArgs = [
"--cipher=serpent-xts-plain64"
"--hash=sha512"
"--iter-time=3000"
"--key-size=256"
"--pbkdf-memory=4194304"
"--sector-size=4096"
extraFormatArgs = commonLuksArgs ++ [
"--cipher=serpent-xts-plain64"
"--hash=sha512"
"--iter-time=3000"
"--pbkdf-memory=4194304"

Copilot uses AI. Check for mistakes.

@flexiondotorg flexiondotorg merged commit 0bfb6d1 into main Jun 26, 2025
@flexiondotorg flexiondotorg deleted the disks branch June 26, 2025 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant