Skip to content

replace switch-to-configuration in nixpkgs w/ home-grown implementation #55

@water-sucks

Description

@water-sucks

Feature Description

The nixpkgs team is heading towards a "perlless activation" direction where Perl should not exist in the base system by default.

This means replacing switch-to-configuration.pl implementation with a non-Perl language.

Ideally, this can be part of the nixos-cli tool itself, but this has to take into account a few things:

  • Create a NixOS module which replaces the activation script that invokes switch-to-configuration.pl with a wrapper that runs nixos-cli's activation scripts.
  • The behavior must be the same; no breaking changes can occur here between switch-to-configuration.pl and our implementation
  • If ran directly, it must be ran in the context of the currently running generation
  • In the future, remote activation using these scripts must be possible as well!

There is already a switch-to-configuration-ng written in Rust - use that as inspiration!

Let's create a new command called nixos activate that stores this functionality.

Command structure: (try to match switch-to-configuration.pl for now - come back later to this)

Goals:

  • Use the new nixos activate interface when available to switch configurations
  • switch-to-configuration.pl references still exist as a fallback mechanism for activation for older generations
  • Be able to enable the perlless profile and still have a fully functioning NixOS system with nixos-cli

Help

Yes

Issues

  • I have checked existing issues and there are no existing ones with the same request.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions