enhance nix-shell and add CI

This commit is contained in:
GTrunSec 2021-05-13 01:18:12 -07:00 committed by David Arnold
parent ffaa63af55
commit c3fa598922
7 changed files with 99 additions and 41 deletions

View file

@ -4,10 +4,12 @@
inputs = {
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:NixOS/nixpkgs";
devshell-flake.url = "github:numtide/devshell";
flake-compat = { url = "github:edolstra/flake-compat"; flake = false; };
};
outputs = { self, nixpkgs, flake-utils }:
{ nixosModules = import ./modules; }
outputs = { self, nixpkgs, flake-utils, devshell-flake, flake-compat }:
{ modules = import ./modules; }
//
(flake-utils.lib.eachDefaultSystem
(system:
@ -16,12 +18,20 @@
inherit system;
overlays = [
self.overlay
devshell-flake.overlay
];
config = { };
config = {
allowUnsupportedSystem = true;
};
};
in
rec {
devShell = import ./shell.nix { inherit system pkgs; };
devShell = with pkgs; devshell.mkShell
{
imports = [
(devshell.importTOML ./devshell.toml)
];
};
packages = flake-utils.lib.flattenTree {
inherit (pkgs)
@ -41,7 +51,8 @@
nixosPath = "${nixpkgs}/nixos";
};
# up to date versions of their nixpkgs equivalents
kubernetes = prev.callPackage ./pkgs/applications/networking/cluster/kubernetes { };
kubernetes = prev.callPackage ./pkgs/applications/networking/cluster/kubernetes
{ };
kubectl = prev.callPackage ./pkgs/applications/networking/cluster/kubectl { };
};
};