Skip to content
/ phoenix Public

Because I want my Nix workspaces to rise from their ashes

License

Notifications You must be signed in to change notification settings

gautaz/phoenix

Repository files navigation

PhoeNix

Phoenix

I occasionally need to reinstall my workspace and this process needs to be repeatable. Using Nix is the most repeatable way I have found so far.

This repository is organized over three main topics:

  • obtaining an install media which fits my needs

  • having all my hosts configurations under version control

  • having my user environment under version control

Installation media

The installation media is designed to install NixOS on standard x86_64 laptops.

The whole process has its own specific documentation.

Install process

Most of the install process is detailed in the installation media documentation.

Nevertheless some additional tasks are needed:

  • the del user password is password by default and need to be changed on the first boot

  • the host ssh public key needs to be added to this repository:

    • on a platform allowed to modify the repository, retrieve the file /etc/ssh/ssh_host_ed25519_key.pub from the new host

    • compute the host age key from the ssh public key with ssh-to-age: ssh-to-age -i <path/to/ssh_host_ed25519_key.pub>

    • add the age key to the repository SOPS keys

    • update the keys of the SOPS managed secrets file: sops updatekeys <repository root>/hosts/_/sops.yaml

    • commit and push these modifications

  • pass on the modifications to the new host and initialize the user environment:

    • sudo nixos-rebuild switch --flake github:gautaz/phoenix

    • home-manager switch --flake github:gautaz/phoenix

    • passage-bootstrap

Hosts configurations

Hosts configurations are flake based and can be installed with both nixos-install --flake (from the installation media environment) and nixos-rebuild switch --flake.

The available hosts are:

  • abelard: current work dell laptop

  • dante: former work dell laptop

  • hepao: my framework laptop

  • kusanagi: to test my custom environment in a virtual machine

  • testbox: mainly used to test the installation media

User environment

I rely on the standalone installation of Home Manager to deploy my user environment. The reason why I do not use Home Manager as a NixOS module is because I want to be able to use it even when I cannot choose NixOS as my operating system.

As home-manager also supports a --flake option to install flake based user environments, this repository’s flake provides a home environment for my main and only account (del).

About

Because I want my Nix workspaces to rise from their ashes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published