feat: Use disko config for mirai
This commit is contained in:
@@ -18,6 +18,7 @@ builtins.listToAttrs (builtins.map (device: {
|
||||
modules = [
|
||||
nur.modules.nixos.default
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
inputs.disko.nixosModules.disko
|
||||
{nixpkgs.overlays = overlays;}
|
||||
./${device.name}/configuration.nix
|
||||
home-manager.nixosModules.home-manager
|
||||
|
||||
98
nixos/mirai/disk-config.nix
Normal file
98
nixos/mirai/disk-config.nix
Normal file
@@ -0,0 +1,98 @@
|
||||
{lib, ...}: {
|
||||
disko.devices = {
|
||||
disk = {
|
||||
one = {
|
||||
type = "disk";
|
||||
device = "/dev/nvme0n1";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
priority = 1;
|
||||
name = "ESP";
|
||||
size = "1G";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = ["umask=0077"];
|
||||
};
|
||||
};
|
||||
primary = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "lvm_pv";
|
||||
vg = "pool";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
two = {
|
||||
type = "disk";
|
||||
device = "/dev/nvme1n1";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
# esp = {
|
||||
# size = "1G";
|
||||
# type = "EF00";
|
||||
# content = {
|
||||
# type = "mdraid";
|
||||
# name = "boot";
|
||||
# };
|
||||
# };
|
||||
primary = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "lvm_pv";
|
||||
vg = "pool";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
# mdadm = {
|
||||
# esp = {
|
||||
# type = "mdadm";
|
||||
# level = 1;
|
||||
# metadata = "1.0";
|
||||
# content = {
|
||||
# type = "filesystem";
|
||||
# format = "vfat";
|
||||
# mountpoint = "/boot";
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
lvm_vg = {
|
||||
pool = {
|
||||
type = "lvm_vg";
|
||||
lvs = {
|
||||
root = {
|
||||
size = "128G";
|
||||
lvm_type = "mirror";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "ext4";
|
||||
mountpoint = "/";
|
||||
mountOptions = [
|
||||
"defaults"
|
||||
];
|
||||
};
|
||||
};
|
||||
home = {
|
||||
size = "512G";
|
||||
lvm_type = "raid0";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "ext4";
|
||||
mountpoint = "/home";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -10,6 +10,7 @@
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
./disk-config.nix
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci"];
|
||||
@@ -17,21 +18,21 @@
|
||||
boot.kernelModules = ["kvm-amd"];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/8f805d1b-a469-4db8-9ee1-b98ea220714a";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/D840-A590";
|
||||
fsType = "vfat";
|
||||
options = ["fmask=0022" "dmask=0022"];
|
||||
};
|
||||
|
||||
fileSystems."/media" = {
|
||||
device = "/dev/disk/by-uuid/cad22fc7-08d2-4650-8d5e-a101e3fd1bd1";
|
||||
fsType = "ext4";
|
||||
};
|
||||
# fileSystems."/" = {
|
||||
# device = "/dev/disk/by-uuid/8f805d1b-a469-4db8-9ee1-b98ea220714a";
|
||||
# fsType = "ext4";
|
||||
# };
|
||||
#
|
||||
# fileSystems."/boot" = {
|
||||
# device = "/dev/disk/by-uuid/D840-A590";
|
||||
# fsType = "vfat";
|
||||
# options = ["fmask=0022" "dmask=0022"];
|
||||
# };
|
||||
#
|
||||
# fileSystems."/media" = {
|
||||
# device = "/dev/disk/by-uuid/cad22fc7-08d2-4650-8d5e-a101e3fd1bd1";
|
||||
# fsType = "ext4";
|
||||
# };
|
||||
|
||||
swapDevices = [];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user