nixos-configs/lib/default.nix
matt1432 a5fdb3e5d4
All checks were successful
Discord / discord commits (push) Has been skipped
refactor: expose custom libs through self flake
2024-11-20 16:13:12 -05:00

13 lines
438 B
Nix

{
perSystem,
inputs,
}: let
inherit (inputs.nixpkgs.lib) concatStringsSep stringToCharacters substring tail toUpper;
mkVersion = src: "0.0.0+" + src.shortRev;
capitalise = str: (toUpper (substring 0 1 str) + (concatStringsSep "" (tail (stringToCharacters str))));
in
{inherit mkVersion capitalise;}
// (import ./flake-lib.nix inputs)
// perSystem (pkgs:
import ./pkgs.nix {inherit pkgs mkVersion capitalise inputs;})