Add base system flake and configuration
Signed-off-by: George Kaklamanos <gkaklas@gkaklas.gr>
This commit is contained in:
parent
6da51a6b1f
commit
22548339a9
5 changed files with 217 additions and 0 deletions
61
nixos/disko.nix
Normal file
61
nixos/disko.nix
Normal file
|
@ -0,0 +1,61 @@
|
|||
{
|
||||
disko.devices.disk.ssd.type = "disk";
|
||||
disko.devices.disk.ssd.device = "/dev/nvme0n1";
|
||||
disko.devices.disk.ssd.content.type = "gpt";
|
||||
disko.devices.disk.ssd.content.partitions.ESP = {
|
||||
# For storing live images in the future,
|
||||
# instead of creating a bootable USB drive
|
||||
size = "10G";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [
|
||||
"defaults"
|
||||
];
|
||||
};
|
||||
};
|
||||
disko.devices.disk.ssd.content.partitions.luks = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "cryptroot";
|
||||
content = {
|
||||
type = "lvm_pv";
|
||||
vg = "VolGroup0";
|
||||
};
|
||||
};
|
||||
};
|
||||
disko.devices.lvm_vg.VolGroup0.type = "lvm_vg";
|
||||
disko.devices.lvm_vg.VolGroup0.lvs.root = {
|
||||
size = "50G";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "btrfs";
|
||||
mountpoint = "/";
|
||||
};
|
||||
};
|
||||
disko.devices.lvm_vg.VolGroup0.lvs.home = {
|
||||
size = "100G";
|
||||
content = {
|
||||
type = "btrfs";
|
||||
subvolumes = {
|
||||
"gkaklas/.local/share/flatpak" = {
|
||||
mountpoint = "/home/gkaklas/.local/share/flatpak";
|
||||
mountOptions = ["defaults" "user"];
|
||||
};
|
||||
};
|
||||
mountpoint = "/home";
|
||||
};
|
||||
};
|
||||
disko.devices.lvm_vg.VolGroup0.lvs.storage = {
|
||||
size = "200G";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "btrfs";
|
||||
mountpoint = "/mnt/storage";
|
||||
mountOptions = ["defaults" "user"];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue