-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Feature request: nixos-assimilate: Turn currently running system into NixOS #2079
Copy link
Copy link
Closed
Labels
0.kind: enhancementAdd something new or improve an existing system.Add something new or improve an existing system.2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.mdhttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md6.topic: nixosIssues or PRs affecting NixOS modules, or package usability issues specific to NixOSIssues or PRs affecting NixOS modules, or package usability issues specific to NixOS9.needs: reporter feedbackThis issue needs the person who filed it to respondThis issue needs the person who filed it to respond
Metadata
Metadata
Assignees
Labels
0.kind: enhancementAdd something new or improve an existing system.Add something new or improve an existing system.2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.mdhttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md6.topic: nixosIssues or PRs affecting NixOS modules, or package usability issues specific to NixOSIssues or PRs affecting NixOS modules, or package usability issues specific to NixOS9.needs: reporter feedbackThis issue needs the person who filed it to respondThis issue needs the person who filed it to respond
Fields
Give feedbackNo fields configured for issues without a type.
This command would not only be very useful for users to switch to NixOS but also would get NixOps to support a large variety of different hosters. Also this would simplify the Hetzner bootstrapping process.
The implementation would look like this:
reboot -fnixos-assimilate, because detecting available partitions and reusing them could become quite difficult).pivot_rootinto the new system and bootup NixOS.In order to properly (re)partition, we need to do the refactoring of nixpart to first of all not be based on kickstart syntax and also have a sane way to specify filesystem layouts.
nixpartis based on blivet, which works with partitioning information in a tree-like structure and also is able to detect existing filesystem layouts, so it's perfectly suited to work with Nix expressions.That means we need to refactor
nixpartto use Nix expressions to specify the filesystem layout and remove all kickstart-related stuff (kickstart is more than just a way to specify partitioning and has dependencies and complexity which we really don't need).And of course, before we could do that, we need to come up with a sane layout for specifying partitions, possibly something that would blend in seamlessly with the
fileSystemsattribute set.This possibly affects/fixes NixOS/nixops#168 and #1080.