nixpkgs/nixos/modules/virtualisation/oci-common.nix
ilian 362d1d6218 oci-image: init scripts to build and upload image
Add image configuration for Oracle Cloud Infrastructure and scripts to
build and upload the image as a Custom Image.
2023-09-21 22:15:22 +01:00

40 lines
959 B
Nix

{ lib, pkgs, ... }:
with lib;
{
imports = [ ../profiles/qemu-guest.nix ];
# Taken from /proc/cmdline of Ubuntu 20.04.2 LTS on OCI
boot.kernelParams = [
"console=tty1"
"console=ttyS0"
"nvme.shutdown_timeout=10"
"libiscsi.debug_libiscsi_eh=1"
"crash_kexec_post_notifiers"
];
boot.growPartition = true;
fileSystems."/" = {
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
autoResize = true;
};
boot.loader.grub = {
version = 2;
device = "/dev/sda";
splashImage = null;
extraConfig = ''
serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1
terminal_input --append serial
terminal_output --append serial
'';
};
# https://docs.oracle.com/en-us/iaas/Content/Compute/Tasks/configuringntpservice.htm#Configuring_the_Oracle_Cloud_Infrastructure_NTP_Service_for_an_Instance
networking.timeServers = [ "169.254.169.254" ];
services.openssh.enable = true;
}