summaryrefslogtreecommitdiff
path: root/hosts/thinkpad/disko.nix
diff options
context:
space:
mode:
Diffstat (limited to 'hosts/thinkpad/disko.nix')
-rw-r--r--hosts/thinkpad/disko.nix150
1 files changed, 142 insertions, 8 deletions
diff --git a/hosts/thinkpad/disko.nix b/hosts/thinkpad/disko.nix
index 97e5c87..31427d3 100644
--- a/hosts/thinkpad/disko.nix
+++ b/hosts/thinkpad/disko.nix
@@ -7,38 +7,56 @@
content = {
type = "gpt";
partitions = {
- biosboot = {
+ bootloader = {
size = "1M";
type = "EF02";
};
+ boot = {
+ size = "2G";
+ content = {
+ type = "filesystem";
+ format = "vfat";
+ mountpoint = "/boot";
+ mountOptions = [ "umask=0077" ];
+ };
+ };
luks = {
size = "100%";
content = {
type = "luks";
- name = "crypted";
+ name = "crypted_main";
settings.allowDiscards = true;
content = {
type = "btrfs";
- extraArgs = ["-f"];
+ extraArgs = [ "-f" ];
subvolumes = {
"root" = {
mountpoint = "/";
mountOptions = [
"compress=zstd:1"
+ "space_cache=v2"
+ "discard=async"
"noatime"
];
};
- "home" = {
- mountpoint = "/home";
+ "nix" = {
+ mountpoint = "/nix";
mountOptions = [
"compress=zstd:1"
+ "space_cache=v2"
+ "discard=async"
+ "nodev"
"noatime"
];
};
- "nix" = {
- mountpoint = "/nix";
+ "home" = {
+ mountpoint = "/home";
mountOptions = [
"compress=zstd:1"
+ "space_cache=v2"
+ "discard=async"
+ "nosuid"
+ "nodev"
"noatime"
];
};
@@ -46,21 +64,43 @@
mountpoint = "/var/log";
mountOptions = [
"compress=zstd:1"
+ "space_cache=v2"
+ "discard=async"
+ "nosuid"
+ "nodev"
+ "noatime"
+ ];
+ };
+ "games" = {
+ mountpoint = "/games";
+ mountOptions = [
+ "compress=none"
+ "space_cache=v2"
+ "discard=async"
+ "nosuid"
+ "nodev"
"noatime"
];
};
"vms" = {
mountpoint = "/vms";
mountOptions = [
+ "compress=none"
+ "space_cache=v2"
+ "discard=async"
"nodatacow"
+ "nosuid"
+ "nodev"
"noatime"
];
};
"swap" = {
mountpoint = "/.swapvol";
mountOptions = [
+ "compress=none"
+ "space_cache=v2"
+ "discard=async"
"nodatacow"
- "compress=no"
"noatime"
];
};
@@ -71,6 +111,100 @@
};
};
};
+ storage = {
+ type = "disk";
+ device = "/dev/sda";
+ content = {
+ type = "gpt";
+ partitions = {
+ luks = {
+ size = "100%";
+ content = {
+ type = "luks";
+ name = "crypted_storage";
+ keyFile = "/tmp/storage.key";
+ settings.allowDiscards = true;
+ content = {
+ type = "btrfs";
+ extraArgs = [ "-f" ];
+ subvolumes = {
+ "archive" = {
+ mountpoint = "/storage/archive";
+ mountOptions = [
+ "compress=zstd:1"
+ "space_cache=v2"
+ "discard=async"
+ "nosuid"
+ "nodev"
+ "noatime"
+
+ "nofail"
+ "x-systemd.device-timeout=5s"
+ ];
+ };
+ "movies" = {
+ mountpoint = "/storage/movies";
+ mountOptions = [
+ "compress=none"
+ "space_cache=v2"
+ "discard=async"
+ "nosuid"
+ "nodev"
+ "noatime"
+
+ "nofail"
+ "x-systemd.device-timeout=5s"
+ ];
+ };
+ "anime" = {
+ mountpoint = "/storage/anime";
+ mountOptions = [
+ "compress=none"
+ "space_cache=v2"
+ "discard=async"
+ "nosuid"
+ "nodev"
+ "noatime"
+
+ "nofail"
+ "x-systemd.device-timeout=5s"
+ ];
+ };
+ "pictures" = {
+ mountpoint = "/storage/pics";
+ mountOptions = [
+ "compress=none"
+ "space_cache=v2"
+ "discard=async"
+ "nosuid"
+ "nodev"
+ "noatime"
+
+ "nofail"
+ "x-systemd.device-timeout=5s"
+ ];
+ };
+ "videos" = {
+ mountpoint = "/storage/vids";
+ mountOptions = [
+ "compress=none"
+ "space_cache=v2"
+ "discard=async"
+ "nosuid"
+ "nodev"
+ "noatime"
+
+ "nofail"
+ "x-systemd.device-timeout=5s"
+ ];
+ };
+ };
+ };
+ };
+ };
+ };
+ };
+ };
};
};
}