mirror of
https://git.pvv.ntnu.no/Drift/pvv-nixos-config.git
synced 2026-02-21 09:27:51 +01:00
nixfmt
This commit is contained in:
@@ -5,9 +5,12 @@ let
|
||||
getDir = dir: builtins.readDir dir;
|
||||
|
||||
# find all files ending in ".nix" which are not this file, or directories, which may or may not contain a default.nix
|
||||
files = dir: filterAttrs
|
||||
(file: type: (type == "regular" && hasSuffix ".nix" file && file != "default.nix") || type == "directory")
|
||||
(getDir dir);
|
||||
files =
|
||||
dir:
|
||||
filterAttrs (
|
||||
file: type:
|
||||
(type == "regular" && hasSuffix ".nix" file && file != "default.nix") || type == "directory"
|
||||
) (getDir dir);
|
||||
# Turn the attrset into a list of the filenames
|
||||
flatten = dir: mapAttrsToList (file: type: file) (files dir);
|
||||
# Turn the filenames into absolute paths
|
||||
|
||||
Reference in New Issue
Block a user