-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hcloud: add base image GENERATE_IMAGE.md
- Loading branch information
Showing
5 changed files
with
107 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Hcloud | ||
|
||
- Create new VM: | ||
- location: falkenstein | ||
- image: ubuntu 22.04 | ||
- type: shared x86 | ||
- use smallest node type (first in list) | ||
- networking: v4 + v6 | ||
- ssh keys: pick your own | ||
- name: nixos-image | ||
- copy ipv4 | ||
- run: | ||
|
||
``` | ||
nix run github:nix-community/nixos-anywhere -- --no-reboot --flake .#hcloud root@IPV4 | ||
``` | ||
|
||
- wait until finished | ||
- shutdown machine | ||
- create snapshot, nixos-base-image | ||
- delete machine |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ inputs, modulesPath, ... }: | ||
{ | ||
imports = [ | ||
(modulesPath + "/profiles/qemu-guest.nix") | ||
|
||
inputs.disko.nixosModules.disko | ||
./disko.nix | ||
({ | ||
_module.args.disks = [ "/dev/sda" ]; | ||
}) | ||
]; | ||
|
||
# boot.loader.grub.device = "/dev/sda"; | ||
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "xen_blkfront" "vmw_pvscsi" ]; | ||
boot.initrd.kernelModules = [ "nvme" ]; | ||
|
||
boot.cleanTmpDir = true; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
disko.devices = { | ||
disk = { | ||
main = { | ||
type = "disk"; | ||
device = "/dev/sda"; | ||
content = { | ||
type = "gpt"; | ||
partitions = { | ||
boot = { | ||
size = "1M"; | ||
type = "EF02"; # for grub MBR | ||
}; | ||
root = { | ||
size = "100%"; | ||
content = { | ||
type = "filesystem"; | ||
format = "ext4"; | ||
mountpoint = "/"; | ||
}; | ||
}; | ||
}; | ||
}; | ||
}; | ||
}; | ||
}; | ||
} |