hosts/dunamis: break up disko
Signed-off-by: unexplrd <unexplrd@linerds.us>
This commit is contained in:
14
hosts/dunamis/disko/default.nix
Normal file
14
hosts/dunamis/disko/default.nix
Normal file
@ -0,0 +1,14 @@
|
||||
{inputs, ...}: let
|
||||
disk = "/dev/disk/by-id/nvme-eui.000000000000000100a075244b5d6185";
|
||||
in {
|
||||
imports = with inputs; [
|
||||
disko.nixosModules.disko
|
||||
];
|
||||
disko.devices.nodev = {
|
||||
"/tmp" = {
|
||||
fsType = "tmpfs";
|
||||
mountOptions = ["rw" "nosuid" "nodev"];
|
||||
};
|
||||
};
|
||||
disko.devices.disk.main = import ./disk-main.nix {inherit disk;};
|
||||
}
|
70
hosts/dunamis/disko/disk-main.nix
Normal file
70
hosts/dunamis/disko/disk-main.nix
Normal file
@ -0,0 +1,70 @@
|
||||
{disk, ...}: {
|
||||
type = "disk";
|
||||
device = disk;
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
size = "2G";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [
|
||||
"umask=0077"
|
||||
"fmask=0022"
|
||||
"dmask=0022"
|
||||
"noexec"
|
||||
"nosuid"
|
||||
"nodev"
|
||||
];
|
||||
};
|
||||
};
|
||||
luks = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "luks-main";
|
||||
initrdUnlock = true;
|
||||
settings.allowDiscards = true;
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = ["-f"];
|
||||
subvolumes = {
|
||||
"@nixos-root" = {
|
||||
mountpoint = "/";
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
"noexec"
|
||||
];
|
||||
};
|
||||
"@home" = {
|
||||
mountpoint = "/home";
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
"@storage" = {
|
||||
mountpoint = "/storage";
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
"@nix" = {
|
||||
mountpoint = "/nix";
|
||||
mountOptions = [
|
||||
"compress-force=zstd"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user