aboutsummaryrefslogtreecommitdiff
path: root/disk-config.nix
diff options
context:
space:
mode:
Diffstat (limited to 'disk-config.nix')
-rw-r--r--disk-config.nix55
1 files changed, 17 insertions, 38 deletions
diff --git a/disk-config.nix b/disk-config.nix
index c7a6dc4..115f2cd 100644
--- a/disk-config.nix
+++ b/disk-config.nix
@@ -1,58 +1,37 @@
+# USAGE in your configuration.nix.
+# Update devices to match your hardware.
+# {
+# imports = [ ./disko-config.nix ];
+# disko.devices.disk.main.device = "/dev/sda";
+# }
{
disko.devices = {
disk = {
- vdb = {
+ main = {
type = "disk";
- device = "/dev/sda";
content = {
type = "gpt";
partitions = {
+ boot = {
+ size = "1M";
+ type = "EF02"; # for grub MBR
+ };
ESP = {
- size = "512M";
+ size = "1G";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
- mountOptions = [
- "defaults"
- ];
+ mountOptions = [ "umask=0077" ];
};
};
- luks = {
+ root = {
size = "100%";
content = {
- type = "luks";
- name = "crypted";
- # disable settings.keyFile if you want to use interactive password entry
- passwordFile = "/tmp/secret.key"; # Interactive
- settings = {
- allowDiscards = true;
- #keyFile = "/tmp/secret.key";
- };
- #additionalKeyFiles = [ "/tmp/additionalSecret.key" ];
- content = {
- type = "btrfs";
- extraArgs = [ "-f" ];
- subvolumes = {
- "/root" = {
- mountpoint = "/";
- mountOptions = [ "compress=zstd" "noatime" ];
- };
- "/home" = {
- mountpoint = "/home";
- mountOptions = [ "compress=zstd" "noatime" ];
- };
- "/nix" = {
- mountpoint = "/nix";
- mountOptions = [ "compress=zstd" "noatime" ];
- };
- "/swap" = {
- mountpoint = "/.swapvol";
- swap.swapfile.size = "20M";
- };
- };
- };
+ type = "filesystem";
+ format = "ext4";
+ mountpoint = "/";
};
};
};