- [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.
* Resolves#118
* Leverage flakes to manage package sources & hashes
* Update documentation with an example.
* Add `mkVersion` function to autogenerate a version string.
* Add srcs package via overlay containing all sources defined in
_pkgs/flake.nix_
* Extend `flk update` with the ability to only update the given input
Managing servers remotely is a big usecase, and deploy-rs is a flake
first deployment tool. By default, all nixosConfigurations are also
setup as deploy-rs nodes.
You'll still need to do some manual ssh setup, but other than that, the
system is ready to deploy.
* Move extern lists to their own folder
* Move unstable package and module imports to their own folder
* Create a genPkgs function to avoid using legacyPackages for the whole
package set
* Move hmActivationPackages to legacyPackages
* fix nixos-option
* use flake-compat for all backward compat concerns
* rebuild devshell after any nix file changes
* reexport system pkgs as legacyPackages
* provide lib flake output
* provide flake lib to nixos configs via `lib.flk`
* clean up flake.nix
- add nixos-hardware flake.
- configuration in hosts/default.nix to be able to include hardware
specifics per host.
- add corresponding documentation in readme
The baseline pkgs for own consumption is nixos, only pkgs/override.nix
provides a mechanism to "backport" packages from unstable.
Therefore, we should expose our packages to others in the same
context as we use them ourselves.
Packages from `pkgs/default.nix` are meant to be exposed to all nixos
configurations. However, #61 removed a redundancy in the output api
which was relied up to do so.
Now you can add packages to the list in pkgs/override.nix and they will
be pulled in from nixpkgs master instead of the default NixOS flake
when installed.
In order to increase determinism in the build environment, we are
having direnv load the shell environment from the flake's `devShell`
output, instead of the traditional `nix-shell` approach. Of course,
one can still enter a `nix-shell` manually on a system without flake
support installed.
It complains that:
value is a list while a set was expected, at /nix/store/0qdcc831rj27wz07lrri6bnfmhvm4wrm-source/flake.nix:26:7
But nixpkgs still expects a list, so we need to pass it just the values.
It was renamed to edition:
cc5d0a2497
leading to the following error:
error: flake 'git+file:///home/jtojnar/Projects/nixflk?ref=template&rev=31c2b767ca7cb901040e388794b34942807719e0' has an unsupported attribute 'epoch', at /nix/store/yndrc91vlh5vm0k4nngx303q1cjm77z9-source/flake.nix:4:3
but that itself has been deprecated:
warning: flake 'git+file:///home/jtojnar/Projects/nixflk' has deprecated attribute 'edition'
The flake inputs can now be arbitrarily referenced from
hosts/default.nix as they are all passed into it. Any input not
declared at the top of hosts/default.nix can still be referenced
as args.<input>.