/nixos-config

Niols's NixOS configuration/s

Primary LanguageNix

Niols's NixOS Configuration/s

Installing NixOS

Installing on an OVH's “Bare Metal Cloud” dedicated instance

Here is the protocol I followed successfuly to install my OVH “Bare Metal Cloud” (ex-Kimsufi) instance in March 2023:

  1. From the default Debian system installed automatically by OVH, follow the NixOS wiki page on installing on a server with a different filesystem. In particular, use @cleverca22's kexec configuration.

  2. Once rebooted to a NixOS in RAM, follow the NixOS manual's instructions for installation with manual partitioning.

  3. Create an appropriate server configuration. I did some things manually but I also got inspired by @jonringer's server configuration. One must not forget the instructions from the first link about networking.

Installing on an Oracle Cloud machine

I used an VM.Standard.A1.Flex instance. For this one, I followed the tutorial from blog.korfuri.fr referencing the same kexec configuration by @cleverca22

How to use

About the flake input secrets

The flake input secrets:

secrets.url = "github:niols/nixos-secrets";
secrets.flake = false;

is a private repository. If it is in the cache of the machine, then there is no need to do anything special. If it is not (the very first time or whenever one updates the lock file), then one needs to give Nix access to private repositories on GitHub. This can be done via an access token, with eg.:

sudo nixos-rebuild switch --option access-tokens github.com=ghp_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

The configuration builds fine without the secrets, so one can also just override that input and give an empty directory. For instance, the CI runs:

nix build \
    .#nixosConfigurations.<name>.config.system.build.toplevel \
    --override-input secrets $(mktemp -d)