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.nix115
1 files changed, 16 insertions, 99 deletions
diff --git a/hosts/thinkpad/disko.nix b/hosts/thinkpad/disko.nix
index b5ccdc1..9816f7f 100644
--- a/hosts/thinkpad/disko.nix
+++ b/hosts/thinkpad/disko.nix
@@ -11,20 +11,16 @@
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_main";
+ name = "crypted";
+ keyFile = "/boot/root.key";
+ extraFormatArgs = [
+ "--type luks2"
+ "--pbkdf argon2id"
+ ];
settings.allowDiscards = true;
content = {
type = "btrfs";
@@ -38,6 +34,16 @@
"noatime"
];
};
+ "boot" = {
+ mountpoint = "/boot";
+ mountOptions = [
+ "compress=none"
+ "discard=async"
+ "nosuid"
+ "nodev"
+ "noatime"
+ ];
+ };
"nix" = {
mountpoint = "/nix";
mountOptions = [
@@ -104,95 +110,6 @@
};
};
};
- storage = {
- type = "disk";
- device = "/dev/sda";
- content = {
- type = "gpt";
- partitions = {
- luks = {
- size = "100%";
- content = {
- type = "luks";
- name = "crypted_storage";
- keyFile = "/tmp/crypt.key";
- settings.allowDiscards = true;
- content = {
- type = "btrfs";
- extraArgs = [ "-f" ];
- subvolumes = {
- "archive" = {
- mountpoint = "/storage/archive";
- mountOptions = [
- "compress=zstd:1"
- "discard=async"
- "nosuid"
- "nodev"
- "noatime"
-
- "nofail"
- "x-systemd.device-timeout=5s"
- ];
- };
- "movies" = {
- mountpoint = "/storage/movies";
- mountOptions = [
- "compress=none"
- "discard=async"
- "nosuid"
- "nodev"
- "noatime"
-
- "nofail"
- "x-systemd.device-timeout=5s"
- ];
- };
- "anime" = {
- mountpoint = "/storage/anime";
- mountOptions = [
- "compress=none"
- "discard=async"
- "nosuid"
- "nodev"
- "noatime"
-
- "nofail"
- "x-systemd.device-timeout=5s"
- ];
- };
- "pictures" = {
- mountpoint = "/storage/pics";
- mountOptions = [
- "compress=none"
- "discard=async"
- "nosuid"
- "nodev"
- "noatime"
-
- "nofail"
- "x-systemd.device-timeout=5s"
- ];
- };
- "videos" = {
- mountpoint = "/storage/vids";
- mountOptions = [
- "compress=none"
- "discard=async"
- "nosuid"
- "nodev"
- "noatime"
-
- "nofail"
- "x-systemd.device-timeout=5s"
- ];
- };
- };
- };
- };
- };
- };
- };
- };
};
};
}