mirror of
https://github.com/itme-brain/nixos.git
synced 2026-03-23 16:29:42 -04:00
modularized further
This commit is contained in:
parent
21a64fd68d
commit
5a6d9378cb
4 changed files with 7 additions and 4 deletions
106
src/system/machines/desktop/modules/disks.nix
Normal file
106
src/system/machines/desktop/modules/disks.nix
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
{ disks ? [ "/dev/nvme0n1" "/dev/sda" ], ... }:
|
||||
|
||||
{
|
||||
disko.devices = {
|
||||
disk = {
|
||||
one = {
|
||||
type = "disk";
|
||||
device = builtins.elemAt disks 0;
|
||||
content = {
|
||||
type = "table";
|
||||
format = "gpt";
|
||||
partitions = [
|
||||
{
|
||||
name = "boot";
|
||||
start = "0";
|
||||
end = "100M";
|
||||
fs-type = "fat32";
|
||||
bootable = true;
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
};
|
||||
}
|
||||
{
|
||||
start = "100M";
|
||||
end = "100%FREE";
|
||||
content = {
|
||||
type = "lvm_pv";
|
||||
vg = "stick";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
disk = {
|
||||
two = {
|
||||
type = "disk";
|
||||
device = builtins.elemAt disks 1;
|
||||
content = {
|
||||
type = "table";
|
||||
format = "gpt";
|
||||
partitions = [
|
||||
{
|
||||
start = "0";
|
||||
end = "100%";
|
||||
content = {
|
||||
type = "lvm_pv";
|
||||
vg = "ssd";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
lvm_vg = {
|
||||
stick = {
|
||||
type = "lvm_vg";
|
||||
lvs = {
|
||||
aaa = {
|
||||
size = "1M";
|
||||
};
|
||||
zzz = {
|
||||
size = "1M";
|
||||
};
|
||||
root = {
|
||||
size = "100%";
|
||||
content = {
|
||||
name = "NixOS";
|
||||
type = "filesystem";
|
||||
format = "ext4";
|
||||
mountpoint = "/";
|
||||
mountOptions = [
|
||||
"defaults"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
lvm_vg = {
|
||||
ssd = {
|
||||
type = "lvm_vg";
|
||||
lvs = {
|
||||
aaa = {
|
||||
size = "1M";
|
||||
};
|
||||
zzz = {
|
||||
size = "1M";
|
||||
};
|
||||
home = {
|
||||
size = "100%";
|
||||
content = {
|
||||
name = "home";
|
||||
type = "filesystem";
|
||||
format = "ext4";
|
||||
mountpoint = "/home";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue