Merge pull request #1 from Mic92/improvements

This commit is contained in:
Lassulus 2023-08-15 09:59:05 +02:00 committed by GitHub
commit d3ca5ce58b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 48 additions and 13 deletions

View File

@ -1,10 +1,37 @@
this is an example repo for nixos-anywhere and disko.
to run the interactive vm test run:
# disko + nixos-anywhere workshop
This is an example repo for nixos-anywhere and disko.
It's part of our CCC camp workshop.
To run the interactive vm test run:
```
nix run github:numtide/nixos-anywhere -- --flake '.#mysystem' --vm-test
```
you can also install the vm on some remote system when running
You can also install the vm on some remote system when running
```
nix run github:numtide/nixos-anywhere -- --flake '.#mysystem' root@192.168.0.10
```
Improve this workshop README:
# disko + nixos-anywhere workshop
This is an example repo for nixos-anywhere and disko.
It's part of our CCC camp workshop.
To run the interactive vm test run:
```
nix run github:numtide/nixos-anywhere -- --flake '.#mysystem' --vm-test
```
You can also install the vm on some remote system when running
```
nix run github:numtide/nixos-anywhere -- --flake '.#mysystem' root@192.168.0.10
```

View File

@ -1,19 +1,23 @@
# Example to create a bios compatible gpt partition
{ lib, ... }: {
{ lib, config, ... }: {
disko.devices.disk = {
one = {
# Change this device name match your block device.
# The `lsblk` command can help you here
device = lib.mkDefault "/dev/sda";
type = "disk";
content = {
type = "gpt";
partitions = {
boot = {
name = "boot";
size = "1M";
type = "EF02";
};
partitions = lib.optionalAttrs config.boot.loader.grub.enable
{
boot = {
name = "boot";
size = "1M";
type = "EF02";
};
} // {
ESP = {
size = "100M";
size = "500M";
type = "EF00";
content = {
type = "filesystem";

View File

@ -1,7 +1,7 @@
{
inputs.nixpkgs.url = github:NixOS/nixpkgs/nixos-unstable;
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
inputs.disko.url = github:nix-community/disko/make-disk-image;
inputs.disko.url = "github:nix-community/disko";
inputs.disko.inputs.nixpkgs.follows = "nixpkgs";
inputs.nixos-anywhere.url = "github:numtide/nixos-anywhere";
@ -26,6 +26,10 @@
efiSupport = true;
efiInstallAsRemovable = true;
};
# Alternative to grub
#boot.loader.systemd-boot.enable = true;
# when installing toggle this
#boot.loader.efi.canTouchEfiVariables = false;
}
];
};