my over complex system configurations dotfiles.isabelroses.com/
nixos nix flake dotfiles linux
10
fork

Configure Feed

Select the types of activity you want to include in your feed.

at main 39 lines 1.4 kB view raw
1# following https://github.com/NixOS/nixpkgs/blob/77ee426a4da240c1df7e11f48ac6243e0890f03e/lib/default.nix 2# as a rough template we can create our own extensible lib and expose it to the flake 3# we can then use that elsewhere like our hosts 4{ lib, inputs }: 5 6lib.fixedPoints.makeExtensible (final: { 7 # keep-sorted start block=yes 8 hardware = import ./hardware.nix; 9 helpers = import ./helpers.nix { inherit lib; }; 10 mkHost = import ./mkhost.nix { inherit inputs lib; }; 11 secrets = import ./secrets.nix { inherit inputs; }; 12 services = import ./services.nix { inherit lib; }; 13 template = import ./template; # templates, selections of code that are repeated 14 validators = import ./validators.nix { inherit lib; }; 15 # keep-sorted end 16 17 # we have to rexport the functions we want to use, but don't want to refer to the whole lib 18 # "path". e.g. gardenLib.hardware.isx86Linux can be shortened to gardenLib.isx86Linux 19 # NOTE: never rexport templates 20 inherit (final.hardware) isx86Linux ldTernary; 21 inherit (final.helpers) 22 mkPubs 23 giturl 24 filterNixFiles 25 importNixFiles 26 importNixFilesAndDirs 27 boolToNum 28 containsStrings 29 indexOf 30 intListToStringList 31 ; 32 inherit (final.secrets) mkSecret; 33 inherit (final.services) mkGraphicalService mkServiceOption; 34 inherit (final.validators) 35 ifTheyExist 36 ifOneEnabled 37 anyHome 38 ; 39})