mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-05-28 02:19:33 +02:00
feat: format via 'ls **/*.nix | each { |it| nixfmt $it.name }'
This commit is contained in:
+16
-15
@@ -1,9 +1,10 @@
|
||||
{lib, ...}: {
|
||||
{ lib, ... }:
|
||||
{
|
||||
colmenaSystem = import ./colmenaSystem.nix;
|
||||
macosSystem = import ./macosSystem.nix;
|
||||
nixosSystem = import ./nixosSystem.nix;
|
||||
|
||||
attrs = import ./attrs.nix {inherit lib;};
|
||||
attrs = import ./attrs.nix { inherit lib; };
|
||||
|
||||
genK3sServerModule = import ./genK3sServerModule.nix;
|
||||
genK3sAgentModule = import ./genK3sAgentModule.nix;
|
||||
@@ -12,18 +13,18 @@
|
||||
|
||||
# use path relative to the root of the project
|
||||
relativeToRoot = lib.path.append ../.;
|
||||
scanPaths = path:
|
||||
builtins.map
|
||||
(f: (path + "/${f}"))
|
||||
(builtins.attrNames
|
||||
(lib.attrsets.filterAttrs
|
||||
(
|
||||
scanPaths =
|
||||
path:
|
||||
builtins.map (f: (path + "/${f}")) (
|
||||
builtins.attrNames (
|
||||
lib.attrsets.filterAttrs (
|
||||
path: _type:
|
||||
(_type == "directory") # include directories
|
||||
|| (
|
||||
(path != "default.nix") # ignore default.nix
|
||||
&& (lib.strings.hasSuffix ".nix" path) # include .nix files
|
||||
)
|
||||
)
|
||||
(builtins.readDir path)));
|
||||
(_type == "directory") # include directories
|
||||
|| (
|
||||
(path != "default.nix") # ignore default.nix
|
||||
&& (lib.strings.hasSuffix ".nix" path) # include .nix files
|
||||
)
|
||||
) (builtins.readDir path)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user