chore: snake_case to camelCase

This commit is contained in:
DashieTM 2025-05-11 13:13:10 +02:00
parent 2b704cc5e7
commit f4e47cbf97
5 changed files with 14 additions and 14 deletions

View file

@ -1,7 +1,7 @@
# with friendly help by stylix: https://github.com/danth/stylix/blob/master/docs/default.nix # with friendly help by stylix: https://github.com/danth/stylix/blob/master/docs/default.nix
{ {
pkgs, pkgs,
build_systems, buildSystems,
lib, lib,
... ...
}: let }: let
@ -13,7 +13,7 @@
summaryAppend = name: '' summaryAppend = name: ''
echo "- [${name}](${name}.md)" >> src/SUMMARY.md echo "- [${name}](${name}.md)" >> src/SUMMARY.md
''; '';
system = (build_systems {root = ../example/.;})."example".options; system = (buildSystems {root = ../example/.;})."example".options;
makeOptionsDocPrograms = names: pkgs.nixosOptionsDoc {options = lib.attrByPath (lib.splitString "." names) null system.mods;}; makeOptionsDocPrograms = names: pkgs.nixosOptionsDoc {options = lib.attrByPath (lib.splitString "." names) null system.mods;};
conf = makeOptionsDoc system.conf; conf = makeOptionsDoc system.conf;
basePath = ../modules/programs; basePath = ../modules/programs;
@ -39,7 +39,7 @@
filteredNames = builtins.filter (names: !(lib.strings.hasInfix "default" names)) ( filteredNames = builtins.filter (names: !(lib.strings.hasInfix "default" names)) (
map (name: lib.strings.removeSuffix ".nix" name) (lib.lists.flatten (pathToStrings basePath "")) map (name: lib.strings.removeSuffix ".nix" name) (lib.lists.flatten (pathToStrings basePath ""))
); );
deduplicatedNames = map (name: lib.strings.splitString "." name |> lib.lists.unique |> lib.strings.concatStringsSep "." ) filteredNames; deduplicatedNames = map (name: lib.strings.splitString "." name |> lib.lists.unique |> lib.strings.concatStringsSep ".") filteredNames;
mods = map makeOptionsDocPrograms deduplicatedNames; mods = map makeOptionsDocPrograms deduplicatedNames;
docs = lib.strings.concatLines (map generateDocs (lib.lists.zipLists deduplicatedNames mods)); docs = lib.strings.concatLines (map generateDocs (lib.lists.zipLists deduplicatedNames mods));
summary = lib.strings.concatStringsSep " " (map summaryAppend deduplicatedNames); summary = lib.strings.concatStringsSep " " (map summaryAppend deduplicatedNames);

View file

@ -26,7 +26,7 @@ dashNix = {
You can then configure your systems in your flake outputs with a provided library command: You can then configure your systems in your flake outputs with a provided library command:
```nix ```nix
nixosConfigurations = inputs.dashNix.dashNixLib.build_systems { root = ./.; }; nixosConfigurations = inputs.dashNix.dashNixLib.buildSystems { root = ./.; };
``` ```
This command will build each system that is placed within the hosts/ directory. This command will build each system that is placed within the hosts/ directory.
@ -132,7 +132,7 @@ After logging in the first time, your password will be set to "firstlogin", plea
## Nixos and Home-manager Modules ## Nixos and Home-manager Modules
You can add additional modules or remove all of them by overriding parameters to the build_systems command: You can add additional modules or remove all of them by overriding parameters to the buildSystems command:
```nix ```nix
nixosConfigurations = nixosConfigurations =
@ -150,7 +150,7 @@ nixosConfigurations =
home = []; home = [];
} }
in in
inputs.dashNix.dashNixLib.build_systems { root = ./.; inherit mods additionalMods; }; inputs.dashNix.dashNixLib.buildSystems { root = ./.; inherit mods additionalMods; };
``` ```
## Additional Inputs ## Additional Inputs
@ -164,7 +164,7 @@ nixosConfigurations =
something.url = "yoururl" something.url = "yoururl"
} }
in in
inputs.dashNix.dashNixLib.build_systems { root = ./.; inherit additionalInputs; }; inputs.dashNix.dashNixLib.buildSystems { root = ./.; inherit additionalInputs; };
``` ```
## Stable/Unstable ## Stable/Unstable
@ -174,12 +174,12 @@ This can be done with the overridePkgs flag for the lib function:
```nix ```nix
nixosConfigurations = nixosConfigurations =
inputs.dashNix.dashNixLib.build_systems { inputs.dashNix.dashNixLib.buildSystems {
root = ./stable; root = ./stable;
inherit additionalInputs; inherit additionalInputs;
overridePkgs = true; overridePkgs = true;
} }
// inputs.dashNix.dashNixLib.build_systems { // inputs.dashNix.dashNixLib.buildSystems {
root = ./unstable; root = ./unstable;
inherit additionalInputs; inherit additionalInputs;
}; };

View file

@ -14,7 +14,7 @@
}; };
outputs = {...} @ inputs: { outputs = {...} @ inputs: {
nixosConfigurations = inputs.dashNix.dashNixLib.build_systems {root = ./.;}; nixosConfigurations = inputs.dashNix.dashNixLib.buildSystems {root = ./.;};
}; };
nixConfig = { nixConfig = {

View file

@ -119,7 +119,7 @@
pkgs = unstable; pkgs = unstable;
system = currentSystem; system = currentSystem;
lib = inputs.unstable.lib; lib = inputs.unstable.lib;
build_systems = dashNixLib.build_systems; buildSystems = dashNixLib.buildSystems;
}; };
dashNixInputs = inputs; dashNixInputs = inputs;
stablePkgs = stable; stablePkgs = stable;

View file

@ -9,7 +9,7 @@
}: { }: {
/* /*
* *
# build_systems # buildSystems
Builds system given a list of system names which are placed within your hosts/ directory. Note that each system has its own directory in hosts/ as well. Builds system given a list of system names which are placed within your hosts/ directory. Note that each system has its own directory in hosts/ as well.
@ -24,7 +24,7 @@
# Example usage # Example usage
:::{.example} :::{.example}
```nix ```nix
nixosConfigurations = build_systems { root = ./.; }; nixosConfigurations = buildSystems { root = ./.; };
``` ```
::: :::
*/ */
@ -35,7 +35,7 @@
# ); # );
# in # in
build_systems = { buildSystems = {
root, root,
additionalMods ? { additionalMods ? {
nixos = []; nixos = [];