1
1
mirror of https://github.com/divnix/digga.git synced 2024-12-26 17:45:28 +03:00
digga/shell/default.nix

44 lines
877 B
Nix
Raw Normal View History

{ 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
2021-02-17 21:49:13 +03:00
pkgs.devshell.mkShell
{
imports = [ (pkgs.devshell.importTOML ./devshell.toml) ];
2021-02-17 21:49:13 +03:00
packages = with installPkgs; [
nixos-install
nixos-generate-config
nixos-enter
pkgs.nixFlakes
];
git.hooks = {
pre-commit.text = lib.fileContents ./pre-commit.sh;
};
2021-02-17 21:49:13 +03:00
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.";
};
}