template: use disko module direcly

This commit is contained in:
Johannes Kirschbauer
2024-04-30 19:16:13 +02:00
parent bfe4f2c8f4
commit 56fad0fd4a
4 changed files with 51 additions and 4 deletions

View File

@@ -89,6 +89,10 @@ Adding or configuring a new machine requires two simple steps:
# ...
machines = {
"jon" = {
imports = [
# ...
./modules/disko.nix
];
# ...
# Change this to the correct ip-address or hostname
@@ -96,7 +100,7 @@ Adding or configuring a new machine requires two simple steps:
clan.networking.targetHost = pkgs.lib.mkDefault "root@<hostname>"
# Change this to the ID-LINK of the desired disk shown by 'lsblk'
clan.diskLayouts.singleDiskExt4 = {
disko.devices.disk.main = {
device = "/dev/disk/by-id/__CHANGE_ME__";
}
@@ -115,6 +119,10 @@ Adding or configuring a new machine requires two simple steps:
# ...
machines = {
"jon" = {
imports = [
# ...
./modules/disko.nix
];
# ...
# Change this to the correct ip-address or hostname
@@ -122,7 +130,7 @@ Adding or configuring a new machine requires two simple steps:
clan.networking.targetHost = pkgs.lib.mkDefault "root@<hostname>"
# Change this to the ID-LINK of the desired disk shown by 'lsblk'
clan.diskLayouts.singleDiskExt4 = {
disko.devices.disk.main = {
device = "/dev/disk/by-id/__CHANGE_ME__";
}

View File

@@ -69,6 +69,7 @@ Below is a guide on how to structure this in your flake.nix:
jon = {
imports = [
./machines/jon/configuration.nix
./modules/disko.nix
# ... more modules
];
nixpkgs.hostPlatform = "x86_64-linux";
@@ -78,7 +79,7 @@ Below is a guide on how to structure this in your flake.nix:
clan.networking.targetHost = pkgs.lib.mkDefault "root@jon";
# remote> lsblk --output NAME,ID-LINK,FSTYPE,SIZE,MOUNTPOINT
clan.diskLayouts.singleDiskExt4 = {
disko.devices.disk.main = {
device = "/dev/disk/by-id/nvme-eui.e8238fa6bf530001001b448b4aec2929";
};