mirror of
https://codeberg.org/privacy1st/nixos-anywhere-example
synced 2024-12-23 02:36:05 +01:00
add lvm example
This commit is contained in:
parent
9b4d0d6c2e
commit
c20b0628b9
62
disk-configs/luks-lvm.nix
Normal file
62
disk-configs/luks-lvm.nix
Normal file
@ -0,0 +1,62 @@
|
||||
{
|
||||
disko.devices = {
|
||||
disk = {
|
||||
disk1 = {
|
||||
type = "disk";
|
||||
device = "/dev/sda";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
size = "500M";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
};
|
||||
};
|
||||
luks = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "crypted";
|
||||
extraOpenArgs = [ "--allow-discards" ];
|
||||
# if you want to use the key for interactive login be sure there is no trailing newline
|
||||
# for example use `echo -n "password" > /tmp/secret.key`
|
||||
settings.keyFile = "/tmp/secret.key";
|
||||
content = {
|
||||
type = "lvm_pv";
|
||||
vg = "pool";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
lvm_vg = {
|
||||
pool = {
|
||||
type = "lvm_vg";
|
||||
lvs = {
|
||||
root = {
|
||||
size = "30G";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "ext4";
|
||||
mountpoint = "/";
|
||||
};
|
||||
};
|
||||
home = {
|
||||
size = "30G";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "ext4";
|
||||
mountpoint = "/home";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -22,6 +22,7 @@
|
||||
disko.nixosModules.disko
|
||||
./disk-configs/simple-efi.nix # choose your favorite disk layout here
|
||||
#./disk-configs/zfs.nix # choose your favorite disk layout here
|
||||
#./disk-configs/luks-lvm.nix # choose your favorite disk layout here
|
||||
{
|
||||
boot.loader.grub = {
|
||||
efiSupport = true;
|
||||
|
Loading…
Reference in New Issue
Block a user