formatting goes brrr
This commit is contained in:
parent
4e8e8f0fed
commit
0f37f09199
17 changed files with 110 additions and 110 deletions
34
flake.nix
34
flake.nix
|
|
@ -24,24 +24,24 @@
|
|||
(builtins.attrNames (builtins.readDir root)); # Reads root path
|
||||
|
||||
modules =
|
||||
let
|
||||
getName = path: lib.removeSuffix ".nix" ( # Strip extension
|
||||
lib.last ( # Gets the last part (filename)
|
||||
lib.splitString "/" ( # Splits the path into components
|
||||
builtins.toString path # Converts the path into a string
|
||||
let
|
||||
getName = path: lib.removeSuffix ".nix" ( # Strip extension
|
||||
lib.last ( # Gets the last part (filename)
|
||||
lib.splitString "/" ( # Splits the path into components
|
||||
builtins.toString path # Converts the path into a string
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
genModulePaths = basePath: builtins.listToAttrs (
|
||||
builtins.map (path: {
|
||||
name = getName path;
|
||||
value = path;
|
||||
}) (getPaths basePath)
|
||||
);
|
||||
in {
|
||||
user = genModulePaths ./modules/user;
|
||||
system = genModulePaths ./modules/system;
|
||||
};
|
||||
);
|
||||
genModulePaths = basePath: builtins.listToAttrs (
|
||||
builtins.map (path: {
|
||||
name = getName path;
|
||||
value = path;
|
||||
}) (getPaths basePath)
|
||||
);
|
||||
in {
|
||||
user = genModulePaths ./modules/user;
|
||||
system = genModulePaths ./modules/system;
|
||||
};
|
||||
|
||||
customPackages = pkgs:
|
||||
let
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue