Skip to content

Allow config activation in initrd #4

@arianvp

Description

@arianvp

initrd should be able to get a NixOS config and nixos-install it to /sysroot before switch-root'ing to stage-2.

Initrd could use kernel parameter pointing to the configuration file; e.g.:

rd.nixos.systemConfig=https://arianvp.me/config.nix 

or a derivation:

rd.nixos.systemConfig=/nix/store/asdhkqhdequehyiqu-systemConfig.drv

or an output path (which must be substitutable by a cache, or already exist on /sysroot/nix/store):

rd.nixos.systemConfig=/nix/store/asdhkqhdequehyiqu-systemConfig

In the future; we might want to support Cloud metadata services through github.com/coreos/afterburn and allow user-data too.

Mechanism wil be implemented through a systemd-generator that orders a unit doing the realisation at the correct time in boot process (just after /sysroot is mounted).

See man bootup

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions