mirror of
https://github.com/TECHNOFAB11/disko.git
synced 2025-12-11 23:50:05 +01:00
turn disk configs into valid nixos configuration
This commit is contained in:
parent
cd825b85fb
commit
769bde0834
24 changed files with 1152 additions and 1186 deletions
|
|
@ -1,52 +1,53 @@
|
|||
{ disks ? [ "/dev/sda" ], ... }:
|
||||
{
|
||||
disk.main = {
|
||||
device = builtins.elemAt disks 0;
|
||||
type = "disk";
|
||||
content = {
|
||||
type = "table";
|
||||
format = "gpt";
|
||||
partitions = [
|
||||
{
|
||||
name = "boot";
|
||||
type = "partition";
|
||||
start = "0";
|
||||
end = "1M";
|
||||
flags = [ "bios_grub" ];
|
||||
}
|
||||
{
|
||||
type = "partition";
|
||||
name = "ESP";
|
||||
start = "1M";
|
||||
end = "512M";
|
||||
bootable = true;
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "nix";
|
||||
type = "partition";
|
||||
start = "512M";
|
||||
end = "100%";
|
||||
part-type = "primary";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "ext4";
|
||||
mountpoint = "/nix";
|
||||
};
|
||||
}
|
||||
{ disks ? [ "/dev/sda" ], ... }: {
|
||||
disko.devices = {
|
||||
disk.main = {
|
||||
device = builtins.elemAt disks 0;
|
||||
type = "disk";
|
||||
content = {
|
||||
type = "table";
|
||||
format = "gpt";
|
||||
partitions = [
|
||||
{
|
||||
name = "boot";
|
||||
type = "partition";
|
||||
start = "0";
|
||||
end = "1M";
|
||||
flags = [ "bios_grub" ];
|
||||
}
|
||||
{
|
||||
type = "partition";
|
||||
name = "ESP";
|
||||
start = "1M";
|
||||
end = "512M";
|
||||
bootable = true;
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "nix";
|
||||
type = "partition";
|
||||
start = "512M";
|
||||
end = "100%";
|
||||
part-type = "primary";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "ext4";
|
||||
mountpoint = "/nix";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
nodev."/" = {
|
||||
fsType = "tmpfs";
|
||||
mountOptions = [
|
||||
"size=2G"
|
||||
"defaults"
|
||||
"mode=755"
|
||||
];
|
||||
};
|
||||
};
|
||||
nodev."/" = {
|
||||
fsType = "tmpfs";
|
||||
mountOptions = [
|
||||
"size=2G"
|
||||
"defaults"
|
||||
"mode=755"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue