Commit graph

930 commits

Author SHA1 Message Date
Timothy DeHerrera 9537daee32
flake: nixos -> nixos-unstable
20.09 is getting stale as we move toward a new release so track
unstable for now.
2021-03-22 23:20:40 -06:00
bors[bot] b7cb975486 Update Changelog for PR 2021-03-22 22:02:13 +00:00
bors[bot] 870897a3e9
Merge #202
202: iso: avoid systemd service startup r=nrdxp a=blaggacao

fixes #194
alternative to #197

# Manual Tests


<details>
<summary>was unrelated</summary>

- [ ] `flk install NixOS --impure` correctly onto `/mnt`  (looks like no profile is present)

Issue: https://github.com/divnix/devos/issues/204
Upstream Issue: https://github.com/NixOS/nixpkgs/issues/116938

</details>

- [x] acceptable build time / closure size ca 850MB (for a simple base OS) ✔️ 
- [x] local profile with `cage` service is disabled, that is: boots into terminal ✔️ 
- [x] success: air gapped / offline devshell enter ✔️ 
- [ ] failure: aire gapped target install: &larr; non blocking bonus item  
```console
$ flk install POS
warning: you don't have internet access; disabling some network-dependent features
building the flake in path:/iso/devos?narHash=sha265-...
warning: you don't have internet access; disabling some network-dependent features
error: unable to download 'https://api.github.com/repos/NixOS/nixpkgs/df8e3...': Couldn't resolve host name (6)
```

&rarr; detailed rationale in the commit messages

❤️ @Pacman99 for the excellent and detailed discussions in #197 and the may ideas, suggestions and code.

Co-authored-by: David Arnold <dar@xoe.solutions>
2021-03-22 21:59:12 +00:00
bors[bot] b1924a21cd Update Changelog for PR 2021-03-19 19:55:27 +00:00
bors[bot] c050027171
Merge #161
161: Multi-arch support for hosts(nixosConfigurations) r=nrdxp a=Pacman99

fixes #72 

also related, #125 

This allows users to set `nixpkgs.system` to any architecture exported by the nixpkgs flake and nixpkgs.pkgs will be set to that system.

I also added `multiPkgs` as a special arg and made `nixpkgs.pkgs` a default. So if someone wanted to do crossSystem builds or anything else with pkgs, that is also an option(eg. mobile-nixos!!).

Co-authored-by: Pacman99 <pachum99@gmail.com>
2021-03-19 19:33:31 +00:00
Pacman99 3c8d22a528 flake/tests: improve multi arch support for flake checks 2021-03-19 12:23:23 -07:00
Pacman99 aec7c92cc7 hosts: set nixpkgs.pkgs based on nixpkgs.system 2021-03-19 12:23:23 -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
bors[bot] 2961c1ea52 Update Changelog for PR 2021-03-18 03:38:02 +00:00
bors[bot] 1b4edf3333
Merge #198
198: hosts/devosSystem: pass modules as attrset r=nrdxp a=Pacman99

This is a fairly simple change that only changes the lib api for devosSystem. But doesn't add any features by itself. Hosts now pass modules to devosSystem as an attrset. And devosSystem just grabs all modules in the set and passes it to nixosSystem. 

I plan to use this in #197 to selectively import modules. And I think it could help with nix-darwin - and other config systems - support, since not all profiles and modules are config system agnostic. This could be a workaround to add rudimentary support for other config systems by only importing the necessary modules.

Overall I think its a useful change and extends the abilities of `devosSystem`

Co-authored-by: Pacman99 <pachum99@gmail.com>
2021-03-18 03:36:12 +00:00
Pacman99 dd494facc3 hosts/devosSystem: pass modules as attrset 2021-03-17 17:28:49 -07:00
bors[bot] 8ee334277a Update Changelog for PR 2021-03-17 00:32:59 +00:00
bors[bot] f3a0fc9cc0
Merge #196
196: doc: enact bootstrapping section r=nrdxp a=blaggacao

closes: #193

Co-authored-by: David Arnold <dar@xoe.solutions>
2021-03-17 00:30:21 +00:00
David Arnold 6b5d4ce8f4
doc: enact bootstrapping section
closes: #193
2021-03-16 19:24:47 -05:00
bors[bot] 7d7c365a2c Update Changelog for PR 2021-03-17 00:00:15 +00:00
bors[bot] c2cd3e79ca
Merge #164
164: add hosts module arg r=nrdxp a=Pacman99

should help with #163. Fixes #169
But either way this could be generally useful. I have one use case of setting up a minecraft bungeecord proxy with servers on different hosts. 

Co-authored-by: Pacman99 <pachum99@gmail.com>
2021-03-16 23:57:32 +00:00
bors[bot] 70e19e0c9e Update Changelog for PR 2021-03-16 23:47:36 +00:00
bors[bot] e6f15ae257
Merge #191
191: iso: copy input closourse into iso to avoide re-download r=blaggacao a=blaggacao

closes #190

Tested on my setup, considerably cuts times and only leaves one (noticable) download.

Co-authored-by: Pacman99 <pachum99@gmail.com>
Co-authored-by: David Arnold <dar@xoe.solutions>
2021-03-16 23:45:57 +00:00
Pacman99 6210daff13 add hosts module arg to easily access other host's config 2021-03-16 16:09:52 -07:00
David Arnold faa8558240
iso: document iso cache / closures (speed!) 2021-03-16 18:01:29 -05: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
Pacman99 4034659350
lib: pass inputs to ./lib
library functions now can access inputs (and their sources!)
directly, for example in order to copy their closure into
the iso registry so that evaluating the flake does not need
to fetch inputs again
2021-03-16 16:38:36 -05:00
Timothy DeHerrera 1ac3d83fc1
bors: no squash merge 2021-03-16 15:15:26 -06:00
bors[bot] ed49988703 Update Changelog for PR 2021-03-16 21:14:56 +00: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 f53b6a4543
core: really fix #162 2021-03-14 21:49:35 -06:00
nrdxp 8f2a8adb55 Update Changelog for PR 2021-03-15 03:42:30 +00:00
Timothy DeHerrera c12528b7d9
core: fix #162 2021-03-14 21:41:28 -06:00
Timothy DeHerrera d8068073c6
lib: add rgxToString function 2021-03-14 21:40:49 -06: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
nrdxp d7f15a664d Update Changelog for PR 2021-03-14 07:14:55 +00: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
nrdxp b06adb81ba Update Changelog for PR 2021-03-05 19:17:24 +00:00
Timothy DeHerrera 5bd8876b74
Merge pull request #147 from blaggacao/da/lib-with-dep-on-pkgs
lib: can depend on pkgs (a la nixpkgs#pkgs/pkgs-lib)
2021-03-05 12:16:38 -07:00
nrdxp c7bb6247f5 Update Changelog for PR 2021-03-05 01:42:38 +00:00
Timothy DeHerrera 98404a158b
hosts: pass host as reference
Allow easier debugging, in the same vain as
1651913910.
2021-03-01 23:05:32 -07:00
Timothy DeHerrera 78af546705
workflows#sync: sync after changelog generation 2021-03-01 22:57:23 -07:00
Timothy DeHerrera 92afb9c52f
README.md: fix typo 2021-03-01 22:42:19 -07:00
nrdxp de810fde33 Update Changelog for tag 2021-03-02 05:29:08 +00:00
Timothy DeHerrera 6e2ed81438
workflows#release: set-env is deprecated
https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands
2021-03-01 22:25:42 -07:00
nrdxp 827fe22334 Update Changelog for PR 2021-03-02 05:16:57 +00:00
Timothy DeHerrera 7c226c9168
lib#genPkgs: reorder overlays
Resolves #146 by allowing external overlays to ve overriden by local
overlays.
2021-03-01 22:15:48 -07:00
Timothy DeHerrera 5bce44b1bd
flake.lock: update 2021-03-01 20:30:47 -07:00
Timothy DeHerrera 44bae21564
nix#registry: update names
Continuing the work from 487fa7ea26,
simplify the registry entries a bit more by simply refering to the
input flakes. Also add alias `orch` for easy search `override`.
2021-03-01 20:11:23 -07:00
nrdxp 8733f2b5dc Update Changelog for PR 2021-03-02 01:45:48 +00:00