Commit graph

47 commits

Author SHA1 Message Date
Pacman99 e98e595704 pass builderArgs to config and extract builds
have mkHomeConfiguration create its own custom build within the function
create a externalModule for customBuilds so its easy to add more
2021-04-30 10:52:35 -07:00
Pacman99 ba01aa7db7 mkSuites: generalize for one profile/suite pair 2021-04-26 11:27:00 -07:00
Pacman99 abd133c244 make devosSystem construct a proper nixos builder
Get `self` and `inputs` during construction, and rely on
specialArgs.channel for nixos flake
2021-04-26 11:27:00 -07:00
Pacman99 2cab5b5d2b add and use lib.collectProfiles
this function collects profiles recursively
2021-04-25 20:53:16 -07:00
Pacman99 58c7d04036 extract iso/hm config modules to lib.modules 2021-04-24 14:44:32 -07:00
Pacman99 4e28ec2d8e devosSystem: fix iso build - can't remove core 2021-04-24 14:44:17 -07:00
Pacman99 2d9ea0d27e lib: init modules and move mkHosts modules there
This helps to split up the code in mkHosts and creates a place where we
can store modules relevent to devos. It will also be easier to remove
unecessary parts of each module in the future when they are all
compartmentalized.
2021-04-24 14:44:16 -07:00
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
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 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 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 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 5f89d27428 ref: extract lib into subflake 2021-04-18 19:11:26 -05: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
Timothy DeHerrera be4b612b23
treewide: format with nixpkgs-fmt 2021-04-09 19:22:08 -06: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 3d1501c384 lib: only readDir if path exists with safeReadDir 2021-04-01 11:39:02 -07: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
bors[bot] ef1ee6e6b8
Merge #217
217: lib/mkPkgs: don't import external files and get inputs as argument r=nrdxp a=Pacman99

Changes mkPkgs to take extern, overrides, and pkgs as an argument. This improves their ability to be used as lib functions.

Co-authored-by: Pacman99 <pachum99@gmail.com>
2021-03-27 17:31:26 +00:00
Pacman99 562f476fb5 lib/mkPkgs: fix function arguments
take extern and overrides as arguments as to not import external files
get inputs as a function dependency from callLib
2021-03-27 10:09:05 -07:00
bors[bot] 00759997ab
Merge #211
211: home-manager fixes r=nrdxp a=nrdxp

- [x] integrate nix-community/home-manager#1880 (to avoid duplicate commits, we'll wait a bit to see if this gets merged)
- [x] don't use all of `systemPackages` for `flk home` 
- [x] test home-manager `activationPackage` and `flk home` as part of CI

Co-authored-by: Timothy DeHerrera <tim.deh@pm.me>
2021-03-26 21:22:49 +00:00
Pacman99 d344fc2ea6 lib/mkPkgs: reorder overlays to get access to devos lib(dev) 2021-03-26 13:00:38 -07:00
Timothy DeHerrera e767f7066e
devosSystem#hmConfig: don't pass systemPackages
The intentions are good, but for users with many profiles, this is
overkill. Proper solution will come when #127 is resolved.
2021-03-25 00:17:50 -06:00
Pacman99 dc9d9877b8 export homeConfigurations for all user@host pairs and add better home-manager only defaults 2021-03-23 09:43:37 -07:00
David Arnold 49b1ad8227
iso: ensure tools of deactivated profiles are still available
This is just for convenience, since the closuers are already in the
store. It might be helpful to be able to test out some things
of those deactivated profiles een on the iso isntaller.
2021-03-18 23:46:47 -05:00
David Arnold 007447652b
iso: add back complete host profile to the nix store
This ensures that all builds of activated profiles are included into
the iso cache and don't require rebuilding within the live installer
environment.
2021-03-18 23:46:47 -05:00
David Arnold 435847823f
style / organization 2021-03-18 23:46:47 -05:00
David Arnold 15cf15b3ed
iso: filter out al profiles (except core)
IN order to avoid random startup of systemd services, filter out all
profiles, except for core and user profiles.

This works becasue of a fundamental devos contract, that modules
only define configuration, but don't implement them and profiles
only implement confguration but don't define them. So only ever an
activated profile is expected to effectively start up a systemd service.

closes: #194
2021-03-18 23:46:47 -05:00
David Arnold db716d1921
lib: ensure path type in mkProfileAttrs
This is required so that filtering via lib.remove works against 
modules.core and similar which are of path type.

It is also a prerequisite for disabledModules to match by module.key
instead of path string relative to nixpkgs' modulePath.
2021-03-18 23:46:47 -05:00
Pacman99 dd494facc3 hosts/devosSystem: pass modules as attrset 2021-03-17 17:28:49 -07:00
David Arnold 8e3777ff34
iso: copy devShell storepath to iso
This avoids for the live nixos on the iso to rebuild the devshell
upon entering it.
2021-03-16 17:35:58 -05:00
David Arnold 17aee57df4
iso: pin inputs as flakes
This intends to avoid downloading inputs on the iso live image
and is a step towards completely air-gaped installs.

credits: @Pacman99

closes: #190
2021-03-16 17:12:38 -05:00
David Arnold 3d324e7533 lib/devos: bake devos repo into live cd (#168)
fix #167 

This worked for me to bootstrap another machine.
2021-03-16 19:50:38 +00:00
Timothy DeHerrera d51cd34fb7
subflakes: make first class citizens
Subflakes should provide their wares as outputs, so wire up the pkgs
flake to reflect that.

Due to the unstable nature of flakes, updating the root flake doesn't
currently update the subflake lock file. Therefore, add additional
logic to flk update script in order to do this behind the scenes.

Nix is now pulled in from the "nix" registry flake in order for users
to take advantage of improvements to the UI since its last update in
nixpkgs.
2021-03-14 21:27:58 -06:00
Timothy DeHerrera c012f2f4ed treewide cleanups and refactoring for initial tests (#157)
- [x] refactor lib into separate files, similar to NixOS/nixpkgs/lib.
- [x] refactor ci to automatically generate derivations from flake outputs
- [x] remove cluttered indirection statements throughout the codebase
- [x] refactor hosts to allow for upcoming integration tests
- [x] improve ambiguity in the existing docs 
- [x] add [BORS](https://bors.tech) support
- [x] add initial integration test
- [x] write tests documentation
- [x] test lib
- [x] improve version string generation, and do so automatically for pkgs/flake.nix sources

Clean up the codebase as best we can in preparation for #152 and add tests. From now on, all PRs will be merged with BORS.
2021-03-14 07:10:51 +00:00