2021-02-14 09:29:17 +00:00
|
|
|
{ self ? (import ../compat).defaultNix
|
|
|
|
, system ? builtins.currentSystem
|
2021-01-19 07:51:23 +00:00
|
|
|
}:
|
|
|
|
let
|
2021-03-14 07:10:51 +00:00
|
|
|
pkgs = (self.lib.os.mkPkgs { inherit self; }).${system};
|
2021-01-19 07:51:23 +00:00
|
|
|
|
2021-02-14 09:29:17 +00:00
|
|
|
inherit (pkgs) lib;
|
|
|
|
|
|
|
|
installPkgs = (lib.nixosSystem {
|
|
|
|
inherit system;
|
|
|
|
modules = [ ];
|
2021-01-19 07:51:23 +00:00
|
|
|
}).config.system.build;
|
|
|
|
|
2021-02-14 09:29:17 +00:00
|
|
|
flk = pkgs.callPackage ./flk.nix { };
|
2021-01-19 07:51:23 +00:00
|
|
|
|
|
|
|
in
|
2021-02-17 18:49:13 +00:00
|
|
|
pkgs.devshell.mkShell
|
|
|
|
{
|
|
|
|
imports = [ (pkgs.devshell.importTOML ./devshell.toml) ];
|
2021-01-19 07:51:23 +00:00
|
|
|
|
2021-02-17 18:49:13 +00:00
|
|
|
packages = with installPkgs; [
|
2021-01-19 07:51:23 +00:00
|
|
|
nixos-install
|
|
|
|
nixos-generate-config
|
|
|
|
nixos-enter
|
2021-03-15 03:27:58 +00:00
|
|
|
pkgs.nixFlakes
|
2021-02-17 19:54:41 +00:00
|
|
|
];
|
2021-01-19 07:51:23 +00:00
|
|
|
|
2021-02-14 09:29:17 +00:00
|
|
|
git.hooks = {
|
|
|
|
pre-commit.text = lib.fileContents ./pre-commit.sh;
|
2021-01-27 15:31:17 +00:00
|
|
|
};
|
|
|
|
|
2021-02-17 18:49:13 +00:00
|
|
|
commands = with pkgs; [
|
|
|
|
{
|
|
|
|
package = flk;
|
|
|
|
}
|
2021-02-17 19:54:41 +00:00
|
|
|
]
|
|
|
|
++ 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.";
|
|
|
|
};
|
2021-01-19 07:51:23 +00:00
|
|
|
}
|