Skip to content

Commit 84a5b93

Browse files
authored
Merge pull request #928 from aos/aos/xfs-options
doc: simple xfs with options
2 parents 3a4de9f + 7d9940a commit 84a5b93

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

example/xfs-with-quota.nix

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
disko.devices = {
3+
disk = {
4+
main = {
5+
device = "/dev/disk/by-id/some-disk-id";
6+
type = "disk";
7+
content = {
8+
type = "gpt";
9+
partitions = {
10+
ESP = {
11+
type = "EF00";
12+
size = "500M";
13+
content = {
14+
type = "filesystem";
15+
format = "vfat";
16+
mountpoint = "/boot";
17+
mountOptions = [ "umask=0077" ];
18+
};
19+
};
20+
root = {
21+
size = "100%";
22+
content = {
23+
type = "filesystem";
24+
format = "xfs";
25+
mountpoint = "/";
26+
mountOptions = [ "defaults" "pquota" ];
27+
};
28+
};
29+
};
30+
};
31+
};
32+
};
33+
};
34+
}

tests/xfs.nix

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{ pkgs ? import <nixpkgs> { }
2+
, diskoLib ? pkgs.callPackage ../lib { }
3+
}:
4+
diskoLib.testLib.makeDiskoTest {
5+
inherit pkgs;
6+
name = "xfs";
7+
disko-config = ../example/xfs-with-quota.nix;
8+
extraTestScript = ''
9+
machine.succeed("mountpoint /");
10+
11+
machine.succeed("xfs_quota -c 'print' / | grep -q '(pquota)'")
12+
'';
13+
}

0 commit comments

Comments
 (0)