Skip to content

Commit f3f3846

Browse files
committed
chore(treewide): s/\(extraModules\)Dir/\1Path/g
to accord with the names of module-path-related special arguments. In `default.nix`, alias `extraModulesDir` to `extraModulesPath` for backward compatibility.
1 parent 8c3fe9c commit f3f3846

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

default.nix

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,17 @@ let
3333
in
3434
rec {
3535
# Folder that contains all the extra modules
36-
extraModulesDir = toString ./extra;
36+
extraModulesPath = toString ./extra;
37+
38+
# Alias for backward compatibility.
39+
extraModulesDir = extraModulesPath;
3740

3841
# Get the modules documentation from an empty evaluation
3942
modules-docs =
4043
(eval {
4144
configuration = {
4245
# Load all of the extra modules so they appear in the docs
43-
imports = importTree extraModulesDir;
46+
imports = importTree extraModulesPath;
4447
};
4548
}).config.modules-docs;
4649

nix/importTOML.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ let
77
dir = toString (builtins.dirOf file);
88
data = builtins.fromTOML (builtins.readFile file);
99

10-
extraModulesDir = toString ../extra;
11-
extraModules = builtins.readDir extraModulesDir;
10+
extraModulesPath = toString ../extra;
11+
extraModules = builtins.readDir extraModulesPath;
1212

1313
importModule =
1414
str:
1515
let
1616
repoFile = "${dir}/${str}";
17-
extraFile = "${extraModulesDir}/${builtins.replaceStrings [ "." ] [ "/" ] str}.nix";
17+
extraFile = "${extraModulesPath}/${builtins.replaceStrings [ "." ] [ "/" ] str}.nix";
1818
in
1919
# First try to import from the user's repository
2020
if lib.hasPrefix "./" str || lib.hasSuffix ".nix" str || lib.hasSuffix ".toml" str then

0 commit comments

Comments
 (0)