mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 21:01:34 +01:00
Reinstall north with luks encryption
This commit is contained in:
parent
fa4d802536
commit
a84721bcf1
2 changed files with 49 additions and 14 deletions
|
|
@ -1,25 +1,60 @@
|
||||||
{
|
{
|
||||||
disko.devices.disk.main = {
|
disko.devices = {
|
||||||
device = "/dev/nvme0n1";
|
disk.main = {
|
||||||
type = "disk";
|
type = "disk";
|
||||||
content = {
|
device = "/dev/nvme0n1";
|
||||||
type = "gpt";
|
content = {
|
||||||
partitions = {
|
type = "gpt";
|
||||||
ESP = {
|
partitions = {
|
||||||
type = "EF00";
|
ESP = {
|
||||||
size = "500M";
|
type = "EF00";
|
||||||
|
size = "512M";
|
||||||
|
content = {
|
||||||
|
type = "filesystem";
|
||||||
|
format = "vfat";
|
||||||
|
mountpoint = "/boot";
|
||||||
|
mountOptions = [ "defaults" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
luks = {
|
||||||
|
size = "100%";
|
||||||
|
content = {
|
||||||
|
name = "cryptroot";
|
||||||
|
type = "luks";
|
||||||
|
settings = {
|
||||||
|
allowDiscards = true;
|
||||||
|
bypassWorkqueues = true;
|
||||||
|
keyFile = "/dev/disk/by-id/usb-SCSI_DISK-0:0";
|
||||||
|
keyFileSize = 512;
|
||||||
|
keyFileTimeout = 5;
|
||||||
|
};
|
||||||
|
additionalKeyFiles = [ "/tmp/secret.key" ];
|
||||||
|
content = {
|
||||||
|
type = "lvm_pv";
|
||||||
|
vg = "pool";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
lvm_vg.pool = {
|
||||||
|
type = "lvm_vg";
|
||||||
|
lvs = {
|
||||||
|
swap = {
|
||||||
|
size = "20G";
|
||||||
content = {
|
content = {
|
||||||
type = "filesystem";
|
type = "swap";
|
||||||
format = "vfat";
|
resumeDevice = true;
|
||||||
mountpoint = "/boot";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
root = {
|
root = {
|
||||||
size = "100%";
|
size = "100%FREE";
|
||||||
content = {
|
content = {
|
||||||
type = "filesystem";
|
type = "filesystem";
|
||||||
format = "ext4";
|
format = "ext4";
|
||||||
mountpoint = "/";
|
mountpoint = "/";
|
||||||
|
mountOptions = [ "defaults" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
devices = {
|
devices = {
|
||||||
north.id = "ROS2S76-ULQWVFC-7KNQQ6Q-MNIWNKT-2QOPPHY-FFQZNVM-GUJRTHE-NZBM3QY";
|
north.id = "FAJS5WM-UAWGW2U-FXCGPSP-VAUOTGM-XUKSEES-D66PMCJ-WBODJLV-XTNCRA7";
|
||||||
inspiron.id = "DLFGFCF-MTYXA23-F235RKL-QFZ4GB6-BUHTYMX-DJCTFRA-NVMAE5Y-R63NMQY";
|
inspiron.id = "DLFGFCF-MTYXA23-F235RKL-QFZ4GB6-BUHTYMX-DJCTFRA-NVMAE5Y-R63NMQY";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue