Hello, I would like to be able to update DigitalOceanImage configuration with some SSH keys and packages and I’m unsure of the best way to do this. Here is what I have:
{ pkgs ? import <nixpkgs> {} }:
let
config = {
imports = [ <nixpkgs/nixos/modules/virtualisation/digital-ocean-image.nix> ];
};
in
(pkgs.nixos config).digitalOceanImage
# updates I want to apply to digitalOceanImage
updates = {
environment.systemPackages = with pkgs; [
curl
git
gvisor
overmind
docker
kubo
grpcurl
];
# ] ++ [ lasr_node ];
# Add your SSH key and comment your username/system-name
users.users.root.openssh.authorizedKeys.keys = [
# eureka-cpu
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINQ66bGgeELzU/wZjpYxSlKIgMoROQxPx76vGdpS3lwc github.eureka@gmail.com" # dev-one
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAsUzc7Wg9FwImAMPc61K/zO9gvUDJVHwQ0+GTrO1mqJ github.eureka@gmail.com" # critter-tank
];
};
but without having to use morph to update the deployment. I know exactly what needs to be on the machine and I’d like to just update the configuration before creating the image.
I’ve tried a few things, but I don’t quire understand how to give the configuration.nix to the part that builds the image. I’m assuming there is a way to pass the config to the image builder, but I’m not sure how.