feat: re-enable disko on ksios

This commit is contained in:
Noa Aarts 2024-09-14 22:36:15 +02:00
parent 2e83752f61
commit 9f233d2d1d
Signed by: noa
GPG key ID: 1850932741EFF672
3 changed files with 44 additions and 1 deletions

View file

@ -112,9 +112,10 @@
inherit nix-colors; inherit nix-colors;
}; };
modules = [ modules = [
disko.nixosModules.disko
inputs.mailserver.nixosModules.default inputs.mailserver.nixosModules.default
./hosts/ksios/configuration.nix
inputs.home-manager.nixosModules.default inputs.home-manager.nixosModules.default
./hosts/ksios/configuration.nix
]; ];
}; };
}; };

View file

@ -8,6 +8,7 @@
[ [
# Include the results of the hardware scan. # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
./disk-config.nix
inputs.home-manager.nixosModules.default inputs.home-manager.nixosModules.default
(modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
(modulesPath + "/profiles/qemu-guest.nix") (modulesPath + "/profiles/qemu-guest.nix")

View file

@ -0,0 +1,41 @@
# Example to create a bios compatible gpt partition
{ lib, ... }:
{
disko.devices = {
disk.disk1 = {
device = lib.mkDefault "/dev/nvme0n1";
type = "disk";
content = {
type = "gpt";
partitions = {
boot = {
name = "boot";
size = "1M";
type = "EF02";
};
esp = {
name = "ESP";
size = "500M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
root = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
mountOptions = [
"defaults"
];
};
};
};
};
};
};
}