192: flake: nixos -> nixos-unstable r=nrdxp a=nrdxp
20.09 is getting stale as we move toward a new release so track unstable for now.
Co-authored-by: Timothy DeHerrera <tim.deh@pm.me>
I originally wanted to use the nix flake to allow users to take
advantage of the latest changes. Just so happened that nixpkgs was
recently updated with a new version around the same time, and this
just adds complexity for no real gain.
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: ← 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)
```
→ 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>
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>
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.
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
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.
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>
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>
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>
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
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.
- [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.