mirror of
https://github.com/nmasur/dotfiles
synced 2025-07-05 11:30:13 +00:00
try giving up and going back to ubuntu vm
This commit is contained in:
5
.github/workflows/flame.yml
vendored
5
.github/workflows/flame.yml
vendored
@ -154,6 +154,11 @@ jobs:
|
|||||||
sleep 10
|
sleep 10
|
||||||
done
|
done
|
||||||
|
|
||||||
|
- name: Run nixos-anywhere
|
||||||
|
if: inputs.action == 'create'
|
||||||
|
run: |
|
||||||
|
nix run github:nix-community/nixos-anywhere -- --flake github:nmasur/dotfiles#flame --target-host ubuntu@${{ steps.host.outputs.stdout }}
|
||||||
|
|
||||||
- name: Write Identity Keys to Files
|
- name: Write Identity Keys to Files
|
||||||
if: inputs.action == 'create'
|
if: inputs.action == 'create'
|
||||||
run: |
|
run: |
|
||||||
|
@ -23,53 +23,53 @@ provider "oci" {
|
|||||||
region = "us-ashburn-1"
|
region = "us-ashburn-1"
|
||||||
}
|
}
|
||||||
|
|
||||||
# # Get the latest Ubuntu image OCID
|
# Get the latest Ubuntu image OCID
|
||||||
# # We'll filter for a recent Ubuntu LTS version (e.g., 22.04 or 24.04) and pick the latest.
|
# We'll filter for a recent Ubuntu LTS version (e.g., 22.04 or 24.04) and pick the latest.
|
||||||
# # Note: Image OCIDs are region-specific. This data source helps find the correct one.
|
# Note: Image OCIDs are region-specific. This data source helps find the correct one.
|
||||||
# data "oci_core_images" "ubuntu_image" {
|
data "oci_core_images" "ubuntu_image" {
|
||||||
# compartment_id = var.compartment_ocid
|
compartment_id = var.compartment_ocid
|
||||||
# operating_system = "Canonical Ubuntu"
|
operating_system = "Canonical Ubuntu"
|
||||||
# # Adjust this version if you prefer a different Ubuntu LTS (e.g., "24.04")
|
# Adjust this version if you prefer a different Ubuntu LTS (e.g., "24.04")
|
||||||
# operating_system_version = "24.04"
|
operating_system_version = "24.04"
|
||||||
# shape_filter = var.instance_shape # Filter by the shape to ensure compatibility
|
shape_filter = var.instance_shape # Filter by the shape to ensure compatibility
|
||||||
# sort_by = "TIMECREATED"
|
sort_by = "TIMECREATED"
|
||||||
# sort_order = "DESC"
|
sort_order = "DESC"
|
||||||
# limit = 1 # Get only the latest
|
limit = 1 # Get only the latest
|
||||||
# }
|
|
||||||
|
|
||||||
resource "oci_core_image" "my_custom_image" {
|
|
||||||
compartment_id = var.compartment_ocid
|
|
||||||
display_name = "noah-nixos"
|
|
||||||
|
|
||||||
image_source_details {
|
|
||||||
source_type = "objectStorageTuple" # Use this if specifying namespace, bucket, and object name
|
|
||||||
# source_type = "objectStorageUri" # Use this if you have a pre-authenticated request URL (PAR)
|
|
||||||
namespace_name = var.object_storage_namespace
|
|
||||||
bucket_name = var.object_storage_bucket_name
|
|
||||||
object_name = var.object_storage_object_name
|
|
||||||
|
|
||||||
source_image_type = "QCOW2" # e.g., "QCOW2", "VMDK"
|
|
||||||
|
|
||||||
# These properties help OCI understand how to launch instances from this image
|
|
||||||
# Adjust based on your custom image's OS and boot mode
|
|
||||||
operating_system = "NixOS" # e.g., "CentOS", "Debian", "Windows"
|
|
||||||
operating_system_version = "25.05" # e.g., "7", "11", "2019"
|
|
||||||
}
|
|
||||||
|
|
||||||
launch_mode = "PARAVIRTUALIZED" # Or "NATIVE", "EMULATED", "CUSTOM"
|
|
||||||
# Optional: for specific launch options if your image requires them
|
|
||||||
# launch_options {
|
|
||||||
# boot_volume_type = "PARAVIRTUALIZED"
|
|
||||||
# firmware = "UEFI_64" # Or "BIOS"
|
|
||||||
# network_type = "PARAVIRTUALIZED"
|
|
||||||
# }
|
|
||||||
|
|
||||||
# Time out for image import operation. Can take a while for large images.
|
|
||||||
timeouts {
|
|
||||||
create = "60m" # Default is 20m, often needs to be increased
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# resource "oci_core_image" "my_custom_image" {
|
||||||
|
# compartment_id = var.compartment_ocid
|
||||||
|
# display_name = "noah-nixos"
|
||||||
|
|
||||||
|
# image_source_details {
|
||||||
|
# source_type = "objectStorageTuple" # Use this if specifying namespace, bucket, and object name
|
||||||
|
# # source_type = "objectStorageUri" # Use this if you have a pre-authenticated request URL (PAR)
|
||||||
|
# namespace_name = var.object_storage_namespace
|
||||||
|
# bucket_name = var.object_storage_bucket_name
|
||||||
|
# object_name = var.object_storage_object_name
|
||||||
|
|
||||||
|
# source_image_type = "QCOW2" # e.g., "QCOW2", "VMDK"
|
||||||
|
|
||||||
|
# # These properties help OCI understand how to launch instances from this image
|
||||||
|
# # Adjust based on your custom image's OS and boot mode
|
||||||
|
# operating_system = "NixOS" # e.g., "CentOS", "Debian", "Windows"
|
||||||
|
# operating_system_version = "25.05" # e.g., "7", "11", "2019"
|
||||||
|
# }
|
||||||
|
|
||||||
|
# launch_mode = "PARAVIRTUALIZED" # Or "NATIVE", "EMULATED", "CUSTOM"
|
||||||
|
# # Optional: for specific launch options if your image requires them
|
||||||
|
# # launch_options {
|
||||||
|
# # boot_volume_type = "PARAVIRTUALIZED"
|
||||||
|
# # firmware = "UEFI_64" # Or "BIOS"
|
||||||
|
# # network_type = "PARAVIRTUALIZED"
|
||||||
|
# # }
|
||||||
|
|
||||||
|
# # Time out for image import operation. Can take a while for large images.
|
||||||
|
# timeouts {
|
||||||
|
# create = "60m" # Default is 20m, often needs to be increased
|
||||||
|
# }
|
||||||
|
# }
|
||||||
|
|
||||||
data "oci_identity_availability_domains" "ads" {
|
data "oci_identity_availability_domains" "ads" {
|
||||||
compartment_id = var.compartment_ocid
|
compartment_id = var.compartment_ocid
|
||||||
}
|
}
|
||||||
@ -82,10 +82,10 @@ resource "oci_core_instance" "my_compute_instance" {
|
|||||||
|
|
||||||
source_details {
|
source_details {
|
||||||
source_type = "image"
|
source_type = "image"
|
||||||
# # Use the OCID of the latest Ubuntu image found by the data source
|
# Use the OCID of the latest Ubuntu image found by the data source
|
||||||
# source_id = data.oci_core_images.ubuntu_image.images[0].id
|
source_id = data.oci_core_images.ubuntu_image.images[0].id
|
||||||
# Use the OCID of the newly imported custom image
|
# # Use the OCID of the newly imported custom image
|
||||||
source_id = oci_core_image.my_custom_image.id
|
# source_id = oci_core_image.my_custom_image.id
|
||||||
# Specify the boot volume size
|
# Specify the boot volume size
|
||||||
boot_volume_size_in_gbs = var.boot_volume_size_in_gbs
|
boot_volume_size_in_gbs = var.boot_volume_size_in_gbs
|
||||||
}
|
}
|
||||||
|
@ -50,6 +50,18 @@ rec {
|
|||||||
# fsType = "vfat";
|
# fsType = "vfat";
|
||||||
# };
|
# };
|
||||||
|
|
||||||
|
# This is the root filesystem containing NixOS
|
||||||
|
fileSystems."/" = {
|
||||||
|
device = "/dev/disk/by-label/nixos";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
# This is the boot filesystem for Grub
|
||||||
|
fileSystems."/boot" = {
|
||||||
|
device = "/dev/disk/by-label/boot";
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
|
||||||
# Allows private remote access over the internet
|
# Allows private remote access over the internet
|
||||||
nmasur.presets.services.cloudflared = {
|
nmasur.presets.services.cloudflared = {
|
||||||
tunnel = {
|
tunnel = {
|
||||||
|
Reference in New Issue
Block a user