Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 11d204a9c4fa
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: c8a65c2d717c
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Mar 16, 2019

  1. filesystems: Add autoResize assertion

    Assert that autoResize is only used when fsType is explicitly set to a
    supported filesystem: if it's set to "auto", the default, the required
    resizing tools won't be copied into the initrd even if the actual
    filesystem is supported.
    talyz committed Mar 16, 2019
    Copy the full SHA
    0eb6d07 View commit details

Commits on Mar 22, 2019

  1. Merge pull request #57751 from talyz/master

    filesystems: Add autoResize assertion
    nlewo authored Mar 22, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    c8a65c2 View commit details
Showing with 7 additions and 0 deletions.
  1. +7 −0 nixos/modules/tasks/filesystems.nix
7 changes: 7 additions & 0 deletions nixos/modules/tasks/filesystems.nix
Original file line number Diff line number Diff line change
@@ -209,10 +209,17 @@ in

assertions = let
ls = sep: concatMapStringsSep sep (x: x.mountPoint);
notAutoResizable = fs: fs.autoResize && !(hasPrefix "ext" fs.fsType || fs.fsType == "f2fs");
in [
{ assertion = ! (fileSystems' ? "cycle");
message = "The ‘fileSystems’ option can't be topologically sorted: mountpoint dependency path ${ls " -> " fileSystems'.cycle} loops to ${ls ", " fileSystems'.loops}";
}
{ assertion = ! (any notAutoResizable fileSystems);
message = let
fs = head (filter notAutoResizable fileSystems);
in
"Mountpoint '${fs.mountPoint}': 'autoResize = true' is not supported for 'fsType = \"${fs.fsType}\"':${if fs.fsType == "auto" then " fsType has to be explicitly set and" else ""} only the ext filesystems and f2fs support it.";
}
];

# Export for use in other modules