mirror of
https://codeberg.org/privacy1st/nixos-anywhere-example
synced 2024-11-23 22:19:33 +01:00
Merge pull request #1 from Mic92/improvements
This commit is contained in:
commit
d3ca5ce58b
33
README.md
33
README.md
@ -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
|
||||
```
|
||||
|
||||
|
@ -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 = {
|
||||
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";
|
||||
|
@ -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;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user