From 7d9940a4df94ac45f328808482673be126b34ef7 Mon Sep 17 00:00:00 2001 From: Aos Dabbagh <25783780+aos@users.noreply.github.com> Date: Sat, 28 Dec 2024 11:21:38 -0500 Subject: [PATCH] doc: simple xfs with options This PR documents an XFS example that uses the `xfs_quota` feature. --- example/xfs-with-quota.nix | 34 ++++++++++++++++++++++++++++++++++ tests/xfs.nix | 13 +++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 example/xfs-with-quota.nix create mode 100644 tests/xfs.nix diff --git a/example/xfs-with-quota.nix b/example/xfs-with-quota.nix new file mode 100644 index 0000000..f4b0fab --- /dev/null +++ b/example/xfs-with-quota.nix @@ -0,0 +1,34 @@ +{ + disko.devices = { + disk = { + main = { + device = "/dev/disk/by-id/some-disk-id"; + type = "disk"; + content = { + type = "gpt"; + partitions = { + ESP = { + type = "EF00"; + size = "500M"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = [ "umask=0077" ]; + }; + }; + root = { + size = "100%"; + content = { + type = "filesystem"; + format = "xfs"; + mountpoint = "/"; + mountOptions = [ "defaults" "pquota" ]; + }; + }; + }; + }; + }; + }; + }; +} diff --git a/tests/xfs.nix b/tests/xfs.nix new file mode 100644 index 0000000..3c7a123 --- /dev/null +++ b/tests/xfs.nix @@ -0,0 +1,13 @@ +{ pkgs ? import { } +, diskoLib ? pkgs.callPackage ../lib { } +}: +diskoLib.testLib.makeDiskoTest { + inherit pkgs; + name = "xfs"; + disko-config = ../example/xfs-with-quota.nix; + extraTestScript = '' + machine.succeed("mountpoint /"); + + machine.succeed("xfs_quota -c 'print' / | grep -q '(pquota)'") + ''; +}