Skip to content

Option --copy-host-keys should allow a custom destination #604

@viceebun

Description

@viceebun

Prerequisites

  • I have searched existing issues to make sure this isn't a duplicate
  • I have checked the documentation to see if this feature already exists

Problem Description

I am using both sops-nix and impermanence, which wipes the root partition on boot, only saving the files in /persist. When enabled, writing the host's ssh keys to /mnt/etc/ssh/ssh_host_* isn't enough, as they are wiped immediately, the directory is bind mounted to /persist/etc/ssh, and then new keys are written.

Proposed Solution

Allow --copy-host-keys to have a <destination> option, defaulting to /etc/ssh, allowing for an override to a persistent directory, such as /persist/etc/ssh.

Alternatives Considered

No response

Feature Type

New command-line option

Use Case

Impermanence / NixOS persistence setups on new machines

Implementation Ideas

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions