summaryrefslogtreecommitdiff
path: root/disko.nix
diff options
context:
space:
mode:
authorMathias Magnusson <mathias@magnusson.space>2025-10-10 18:42:56 +0200
committerMathias Magnusson <mathias@magnusson.space>2025-10-19 15:25:56 +0200
commitfd69ebbaad366cca94f13489723ce003bea69c36 (patch)
tree40c77de69928cae1aba88202674964353216c125 /disko.nix
downloadoden-fd69ebbaad366cca94f13489723ce003bea69c36.tar.gz
Initial commit
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;
+}