blob: 1375ef5feacb85bb4a3f44c10bf6587fd80b2cbe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
{ lib }:
{
checkMe = { name ? "", ... }@me:
assert name != "";
assert (builtins.pathExists ./machines/${name}.nix)
&& (builtins.pathExists ./hardware/${name}.nix);
me;
titleCase = str: with lib.strings; let
firstCharUpper = s: concatStrings [(toUpper (substring 0 1 s)) (substring 1 (stringLength s) s)];
in
concatStringsSep " " (map firstCharUpper (splitString " " str));
}
|