eldrid disko
This commit is contained in:
@ -13,6 +13,7 @@
|
||||
./hardware.nix
|
||||
./programs.nix
|
||||
./stylix.nix
|
||||
./disko.nix
|
||||
./users.nix
|
||||
];
|
||||
|
||||
|
88
hosts/eldrid/disko.nix
Normal file
88
hosts/eldrid/disko.nix
Normal file
@ -0,0 +1,88 @@
|
||||
{inputs, ...}: {
|
||||
imports = with inputs; [
|
||||
disko.nixosModules.disko
|
||||
];
|
||||
disko.devices.disk.main = {
|
||||
type = "disk";
|
||||
device = "/dev/nvme0n1";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
size = "1G";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [
|
||||
"umask=0077"
|
||||
"fmask=0022"
|
||||
"dmask=0022"
|
||||
"noexec"
|
||||
];
|
||||
};
|
||||
};
|
||||
luks = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "lukscrypted";
|
||||
initrdUnlock = true;
|
||||
settings.allowDiscards = true;
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = ["-f"];
|
||||
subvolumes = {
|
||||
"@nixos" = {
|
||||
mountpoint = "/";
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
# "noexec"
|
||||
];
|
||||
};
|
||||
"@home" = {
|
||||
mountpoint = "/home";
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
"@flatpak" = {
|
||||
mountpoint = "/var/lib/flatpak";
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
# "@storage" = {
|
||||
# mountpoint = "/storage";
|
||||
# mountOptions = [
|
||||
# "compress=zstd"
|
||||
# "noatime"
|
||||
# ];
|
||||
# };
|
||||
"@swap" = {
|
||||
mountpoint = "/swap";
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
# "noexec"
|
||||
];
|
||||
};
|
||||
# "@nix" = {
|
||||
# mountpoint = "/nix";
|
||||
# mountOptions = [
|
||||
# "compress=zstd"
|
||||
# "noatime"
|
||||
# ];
|
||||
# };
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -26,36 +26,6 @@ in {
|
||||
boot.kernelModules = ["kvm-intel"];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/fc3d843d-54c6-4b2f-ac56-77f81600745e";
|
||||
fsType = "btrfs";
|
||||
options = ["subvol=@nixos,compress=zstd"];
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."luks".device = "/dev/disk/by-uuid/cbd7d98e-745b-4828-b868-42881bad353d";
|
||||
|
||||
fileSystems."/home" = {
|
||||
device = "/dev/disk/by-uuid/fc3d843d-54c6-4b2f-ac56-77f81600745e";
|
||||
fsType = "btrfs";
|
||||
options = ["subvol=@home,compress=zstd"];
|
||||
};
|
||||
|
||||
fileSystems."/var/lib/flatpak" = {
|
||||
device = "/dev/disk/by-uuid/fc3d843d-54c6-4b2f-ac56-77f81600745e";
|
||||
fsType = "btrfs";
|
||||
options = ["subvol=@flatpak,compress=zstd"];
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/D38C-AA51";
|
||||
fsType = "vfat";
|
||||
options = ["fmask=0077" "dmask=0077"];
|
||||
};
|
||||
fileSystems."/swap" = {
|
||||
device = "/dev/disk/by-uuid/fc3d843d-54c6-4b2f-ac56-77f81600745e";
|
||||
fsType = "btrfs";
|
||||
options = ["subvol=@swap,compress=zstd"];
|
||||
};
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/swap/swapfile";
|
||||
|
Reference in New Issue
Block a user