summaryrefslogtreecommitdiff
path: root/disko.nix
diff options
context:
space:
mode:
Diffstat (limited to 'disko.nix')
-rw-r--r--disko.nix49
1 files changed, 49 insertions, 0 deletions
diff --git a/disko.nix b/disko.nix
new file mode 100644
index 0000000..1f89ffa
--- /dev/null
+++ b/disko.nix
@@ -0,0 +1,49 @@
+{
+ disko.devices.disk.main = {
+ type = "disk";
+ device = "/dev/nvme0n1";
+ content = {
+ type = "gpt";
+ partitions.ESP = {
+ priority = 1;
+ name = "ESP";
+ start = "1M";
+ end = "512M";
+ type = "EF00";
+ content = {
+ type = "filesystem";
+ format = "vfat";
+ mountpoint = "/boot";
+ mountOptions = [ "umask=0077" ];
+ };
+ };
+ partitions.root = {
+ size = "100%";
+ content = {
+ type = "btrfs";
+ extraArgs = [ "-f" ];
+ subvolumes = {
+ "/root" = {
+ mountpoint = "/";
+ mountOptions = [ "subvol=root" "compress=zstd" "noatime" ];
+ };
+ "/home" = {
+ mountpoint = "/home";
+ mountOptions = [ "subvol=home" "compress=zstd" "noatime" ];
+ };
+ "/nix" = {
+ mountpoint = "/nix";
+ mountOptions = [ "subvol=nix" "compress=zstd" "noatime" ];
+ };
+ "/nix/persist" = {
+ mountpoint = "/nix/persist";
+ mountOptions = [ "subvol=persist" "compress=zstd" "noatime" ];
+ };
+ };
+ };
+ };
+ };
+ };
+
+ fileSystems."/nix/persist".neededForBoot = true;
+}