ark/shell/default.nix
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

43 lines
858 B
Nix

{ self ? (import ../compat).defaultNix
, system ? builtins.currentSystem
}:
let
pkgs = (self.lib.os.mkPkgs { inherit self; }).${system};
inherit (pkgs) lib;
installPkgs = (lib.nixosSystem {
inherit system;
modules = [ ];
}).config.system.build;
flk = pkgs.callPackage ./flk.nix { };
in
pkgs.devshell.mkShell
{
imports = [ (pkgs.devshell.importTOML ./devshell.toml) ];
packages = with installPkgs; [
nixos-install
nixos-generate-config
nixos-enter
];
git.hooks = {
pre-commit.text = lib.fileContents ./pre-commit.sh;
};
commands = with pkgs; [
{
package = flk;
}
]
++ lib.optional (system != "i686-linux") { package = cachix; }
++ lib.optional (system == "x86_64-linux") {
name = "deploy";
package = deploy-rs;
help = "A simple multi-profile Nix-flake deploy tool.";
};
}