Commit graph

111 commits

Author SHA1 Message Date
Pacman99 eab0bf074c lib: one line for arguments, drop userFlake*
Also format all files and add a flake.lock for lib
for a folder thats meant to work on other flakes theres never a reason
it should need to refer to itself, only other flakes. So "self" and
"inputs" are better namings for these variables. The userFlake* is
redundant and confusing, when trying to call the functions its hard to
figure out how to use them when there are now two lines of arguments to
figure out.
2021-04-23 23:46:56 -07:00
Pacman99 fe9ba26561 evalArgs: cleanup module and type references
fix pathTo and coercedList types
add modulesModule to also include modules option under home
2021-04-23 17:59:01 -07:00
David Arnold eea4e40d7e
ref: config -> hosts | nixos -> os
in devos, we differentiate clearly between home and os
configuration, reason for which we are more precise by not naming
after the (more generic) fup API.
2021-04-21 21:45:39 -05:00
Pacman99 f3defb486d used coercedTo for typing and improve options
allow lists, nested lists, and non-lists for list like options
drop config.<name>.externalModules
2021-04-21 18:38:58 -07:00
Pacman99 24dbb2b323
add mkFlakeDoc to pkgs-lib to build options doc 2021-04-19 00:41:20 -05:00
David Arnold 239386b5f8
Merge branch 'core' into api-next 2021-04-19 00:10:47 -05:00
David Arnold a714cf466d
fix: various left-overs 2021-04-18 23:48:19 -05:00
David Arnold 8134350545
ref: simplify pkgs-lib deps injection 2021-04-18 22:40:53 -05:00
David Arnold 362cc31827
fix: constructors of mkFlake function family 2021-04-18 22:29:28 -05:00
David Arnold 6f0392b55e ref: cave out instances of userFLake dependencies and intject them as
if functions where contructors
2021-04-18 22:16:53 -05:00
David Arnold 40acfd13e3 use: makeExtensible 2021-04-18 22:16:53 -05:00
David Arnold be924bcb27 ref: reduce exposure to callLibs
for clarity's sake, expose which function uses final and prev, so that
people can have a clearer understanding how they relate to each other
in terms of dependencies.

also a simple `{ lib = final; }` probably does not warrant a complete
callLibs obscurization.
2021-04-18 22:16:53 -05:00
Timothy DeHerrera f254304796
mv nix/ci.nix directly to default.nix 2021-04-18 21:00:45 -06:00
Timothy DeHerrera 127cb25bd1
lib: move compat to lib 2021-04-18 20:51:47 -06:00
Timothy DeHerrera fbce126f4d
cachix: move out of root and into profile 2021-04-18 20:43:37 -06:00
Timothy DeHerrera 2d91946745
doc: move all docs under doc 2021-04-18 20:42:49 -06:00
Timothy DeHerrera 048171ecaf
lib: improve profileMap for added convenience
Simplify the definition of suites a bit by removing the need for list
concatenation.
2021-04-18 20:42:43 -06:00
David Arnold 9dca402914 ref: make onion with flake-utils 2021-04-18 20:31:49 -05:00
David Arnold 6cccb55263 ref: userSelf -> userFlakeSelf 2021-04-18 20:04:19 -05:00
David Arnold cd7fb4f54c ref: flatten out inputs 2021-04-18 20:04:19 -05:00
David Arnold 16b3fad559 ref: merge dev into lib 2021-04-18 19:28:03 -05:00
David Arnold c24199649a fixup: distinguish self and userSelf 2021-04-18 19:11:26 -05:00
David Arnold 6116779b23 fixup: nix flake check II / II 2021-04-18 19:11:26 -05:00
David Arnold 21a03fa94c fixup: nix flake check I / X 2021-04-18 19:11:26 -05:00
David Arnold 5f89d27428 ref: extract lib into subflake 2021-04-18 19:11:26 -05:00
David Arnold 863c17621c libtests: outfactor in preparation of lib/flake.nix 2021-04-18 19:11:26 -05:00
Pacman99 0db2bb041e add old evalArgs as evalOldArgs, so flake works 2021-04-13 11:24:10 -07:00
Pacman99 2b70cd3ae6 fix some small bugs in mkFlake/evalArgs 2021-04-11 22:34:15 -07:00
Pacman99 b7bcaea497 Update evalArgs to match the new planned api 2021-04-11 20:09:47 -07:00
Pacman99 658cd2bb08 pkgs-lib/shell: update to new homeConfigurations
flk should switch to use home-manager --flake whenever the updated
package is made available in the hm flake or nixpkgs
2021-04-11 10:28:28 -07:00
Pacman99 401566af34 lib/pkgs-lib: update checks for new hm format 2021-04-10 22:13:54 -07:00
Pacman99 8ba7bffc3f export users home for home-manager --flake
home-manager --flake needs the activationPackage in the root of the
homeConfiguration
2021-04-10 22:04:49 -07:00
Pacman99 ac4c26755b init pkgs-lib, move tests and shell there 2021-04-10 13:36:54 -07:00
Timothy DeHerrera be4b612b23
treewide: format with nixpkgs-fmt 2021-04-09 19:22:08 -06:00
Pacman99 3daa990728
fix userSpecialArgs defaults (#234)
Co-authored-by: Pacman99 <pachum99@gmail.com>
2021-04-09 12:03:42 -05:00
Timothy DeHerrera 18dbc7d0e4
Revert "drop toString in evalArgs - trying to fix CI"
This reverts commit a253033931.
2021-04-08 21:18:08 -06:00
Timothy DeHerrera eaff91c0f9
Revert "drop toString in pathsIn - trying to fix CI issues"
This reverts commit 930b3e96b4.
2021-04-08 21:17:24 -06:00
bors[bot] 3823eb6423
Merge #231
231: Move flake implementation logic to lib r=nrdxp a=Pacman99

This is a simpler version of #218 that moves flake logic to lib and adds a module to evaluate devos. This DOES NOT support out of tree usage, so if you were following any of the previous PR's, the doc sections/examples to use devos as a library will not work. There is work to make a cleaner api and only then will out of tree support work. Until then, this is still useful to simplify devos and clean up a lot of the implementation logic.

Co-authored-by: Pacman99 <pachum99@gmail.com>
2021-04-09 02:58:30 +00:00
Pacman99 115f1e6711 make core an unecessary profile and add to suites
Prevents mkHosts subverting standard devos api to import core and add
all necessary core features to mkHosts, so core can be safely deleted in
suites
2021-04-06 19:00:57 -07:00
Pacman99 a253033931 drop toString in evalArgs - trying to fix CI 2021-04-06 17:33:05 -07:00
Pacman99 930b3e96b4 drop toString in pathsIn - trying to fix CI issues 2021-04-06 17:02:30 -07:00
Pacman99 340784df6d lib: init evalFlakeArgs for mkFlake args
module describing devos flake arguments
2021-04-06 12:45:04 -07:00
Pacman99 a76ca177fd lib: init mkFlake to create a devos flake
general lib function - not devos specific
2021-04-06 12:45:04 -07:00
Pacman99 3d1501c384 lib: only readDir if path exists with safeReadDir 2021-04-01 11:39:02 -07:00
bors[bot] f14dcdaf78
Merge #224
224: Allow for directories in module-list r=nrdxp a=Pacman99

fixes #221 
building on #222 this PR improves the lib functions pathsToImportedAttrs and pathsIn. First to add support for directories. This does not support actually passing a file in a directory, so `./matrix/default.nix` won't work but `./matrix` will - I should probably document this somewhere. 
Also I moved the filtering for nix files to `pathsIn`, since its only necessary for auto-import. We can assume that users would pass proper files in `module-list.nix`.

Co-authored-by: Pacman99 <pachum99@gmail.com>
2021-03-29 17:22:20 +00:00
Pacman99 7650526407 isoConfig: fix disabling profiles
convert each to a list which doesn't get appended to modulesPath
2021-03-29 09:59:58 -07:00
Pacman99 ec7eff63eb move hosts implementation logic to lib as mkHosts 2021-03-29 09:05:54 -07:00
Pacman99 7ebd6b5730 move suites implementation logic to lib as mkSuites 2021-03-29 09:05:54 -07:00
Pacman99 8ab865a853 lib/mkProfileAttrs: don't change to path
store paths can't be appended to a path
2021-03-29 09:05:54 -07:00
Pacman99 b3aa38702b lib/pathsToImportedAttrs: allow directories
check if directory has a default.nix and use directory name as key

Co-authored-by: Timothy DeHerrera <tim.deh@pm.me>
2021-03-29 08:54:25 -07:00