summaryrefslogtreecommitdiff
path: root/nix/disko
diff options
context:
space:
mode:
Diffstat (limited to 'nix/disko')
-rw-r--r--nix/disko/btrfs-simple.nix47
1 files changed, 47 insertions, 0 deletions
diff --git a/nix/disko/btrfs-simple.nix b/nix/disko/btrfs-simple.nix
new file mode 100644
index 0000000..08fafd4
--- /dev/null
+++ b/nix/disko/btrfs-simple.nix
@@ -0,0 +1,47 @@
+{ lib, config, ... }:
+let
+ spec = {
+ disko.devices = {
+ disk = {
+ main = {
+ type = "disk";
+ device = config.monorepo.vars.device;
+ content = {
+ type = "gpt";
+ partitions = {
+ ESP = {
+ priority = 1;
+ name = "ESP";
+ start = "1M";
+ end = "128M";
+ type = "EF00";
+ content = {
+ type = "filesystem";
+ format = "vfat";
+ mountpoint = "/boot";
+ mountOptions = [ "umask=0077" ];
+ };
+ };
+ root = {
+ size = "100%";
+ content = {
+ type = "btrfs";
+ extraArgs = [ "-f" ]; # Override existing partition
+ mountpoint = "/";
+ mountOptions = [
+ "compress=zstd"
+ "noatime"
+ ];
+ };
+ };
+ };
+ };
+ };
+ };
+ };
+};
+in
+{
+ monorepo.vars.diskoSpec = spec;
+ disko.devices = spec.disko.devices;
+}