nix run github:plmercereau/nicos -- init
{
  inputs = {
    nicos.url = "github:plmercereau/nicos";
  };

  outputs = {nicos, ...}:
    nicos.lib.configure {
      projectRoot = ./.;
      adminKeys = ["ssh-ed25519 ..."];
      nixos = {
        enable = true;
        path = "./hosts-nixos";
      };
    }
    {
      # Your additional flake outputs go here
    };
}
nix run github:plmercereau/nicos -- init
{
  inputs = {
    nicos.url = "github:plmercereau/nicos";
  };

  outputs = {nicos, ...}:
    nicos.lib.configure {
      projectRoot = ./.;
      adminKeys = ["ssh-ed25519 ..."];
      nixos = {
        enable = true;
        path = "./hosts-nixos";
      };
    }
    {
      # Your additional flake outputs go here
    };
}
1

Prerequisites

2

Installation

nix run github:plmercereau/nicos -- init

It will guide you in the configuration of your project. For now, you can only enable the NixOS feature and skip the other ones.

3

Prepare a Hetzner Cloud instance

Add your current user’s SSH public key on Hetzner Cloud to this machine. See Hetzner Cloud documentation for more information.

4

Create a machine configuration

nix run github:plmercereau/nicos -- create my-machine
5

Install the machine

Now that the machine configuration is ready, you can install it on your Hetzner Cloud server:

nix run github:plmercereau/nicos -- create \
  my-machine [machine-ip]

It will install and configure the machine using nixos-anywhere, kexec, and cloud-init.