From f4e47cbf97f5fbb8d0955d67a065e21d256091f3 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sun, 11 May 2025 13:13:10 +0200 Subject: [PATCH] chore: snake_case to camelCase --- docs/default.nix | 6 +++--- docs/src/README.md | 12 ++++++------ example/flake.nix | 2 +- flake.nix | 2 +- lib/default.nix | 6 +++--- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/docs/default.nix b/docs/default.nix index 65a0659..8b3c289 100644 --- a/docs/default.nix +++ b/docs/default.nix @@ -1,7 +1,7 @@ # with friendly help by stylix: https://github.com/danth/stylix/blob/master/docs/default.nix { pkgs, - build_systems, + buildSystems, lib, ... }: let @@ -13,7 +13,7 @@ summaryAppend = name: '' 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;}; conf = makeOptionsDoc system.conf; basePath = ../modules/programs; @@ -39,7 +39,7 @@ filteredNames = builtins.filter (names: !(lib.strings.hasInfix "default" names)) ( 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; docs = lib.strings.concatLines (map generateDocs (lib.lists.zipLists deduplicatedNames mods)); summary = lib.strings.concatStringsSep " " (map summaryAppend deduplicatedNames); diff --git a/docs/src/README.md b/docs/src/README.md index d5f1a80..fabdf0b 100644 --- a/docs/src/README.md +++ b/docs/src/README.md @@ -26,7 +26,7 @@ dashNix = { You can then configure your systems in your flake outputs with a provided library command: ```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. @@ -132,7 +132,7 @@ After logging in the first time, your password will be set to "firstlogin", plea ## 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 nixosConfigurations = @@ -150,7 +150,7 @@ nixosConfigurations = home = []; } in - inputs.dashNix.dashNixLib.build_systems { root = ./.; inherit mods additionalMods; }; + inputs.dashNix.dashNixLib.buildSystems { root = ./.; inherit mods additionalMods; }; ``` ## Additional Inputs @@ -164,7 +164,7 @@ nixosConfigurations = something.url = "yoururl" } in - inputs.dashNix.dashNixLib.build_systems { root = ./.; inherit additionalInputs; }; + inputs.dashNix.dashNixLib.buildSystems { root = ./.; inherit additionalInputs; }; ``` ## Stable/Unstable @@ -174,12 +174,12 @@ This can be done with the overridePkgs flag for the lib function: ```nix nixosConfigurations = - inputs.dashNix.dashNixLib.build_systems { + inputs.dashNix.dashNixLib.buildSystems { root = ./stable; inherit additionalInputs; overridePkgs = true; } - // inputs.dashNix.dashNixLib.build_systems { + // inputs.dashNix.dashNixLib.buildSystems { root = ./unstable; inherit additionalInputs; }; diff --git a/example/flake.nix b/example/flake.nix index 3e7cb65..640ee54 100644 --- a/example/flake.nix +++ b/example/flake.nix @@ -14,7 +14,7 @@ }; outputs = {...} @ inputs: { - nixosConfigurations = inputs.dashNix.dashNixLib.build_systems {root = ./.;}; + nixosConfigurations = inputs.dashNix.dashNixLib.buildSystems {root = ./.;}; }; nixConfig = { diff --git a/flake.nix b/flake.nix index 6290e63..154187a 100644 --- a/flake.nix +++ b/flake.nix @@ -119,7 +119,7 @@ pkgs = unstable; system = currentSystem; lib = inputs.unstable.lib; - build_systems = dashNixLib.build_systems; + buildSystems = dashNixLib.buildSystems; }; dashNixInputs = inputs; stablePkgs = stable; diff --git a/lib/default.nix b/lib/default.nix index 2cdc15a..79bc9f4 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -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. @@ -24,7 +24,7 @@ # Example usage :::{.example} ```nix - nixosConfigurations = build_systems { root = ./.; }; + nixosConfigurations = buildSystems { root = ./.; }; ``` ::: */ @@ -35,7 +35,7 @@ # ); # in - build_systems = { + buildSystems = { root, additionalMods ? { nixos = [];