Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
Shay Bergmann committed Jan 14, 2021
1 parent e4b113a commit 97e6947
Show file tree
Hide file tree
Showing 16 changed files with 1,625 additions and 246 deletions.
152 changes: 49 additions & 103 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions flake.nix
Expand Up @@ -3,7 +3,8 @@

inputs = {
utils.url = "github:kreisys/flake-utils";
cli.url = "github:input-output-hk/bitte-cli/decalisssystemd";
cli.url = "github:input-output-hk/bitte-cli";
nix.url = "github:NixOS/nix/4e9cec79bf5302108a031b3910f63baccf719eb5";

ops-lib = {
url = "github:input-output-hk/ops-lib";
Expand All @@ -16,7 +17,7 @@
};
};

outputs = { self, nixpkgs, terranix, utils, cli, ... }:
outputs = { self, nix, nixpkgs, terranix, utils, cli, ... }:
(utils.lib.simpleFlake {
inherit nixpkgs;
name = "bitte";
Expand All @@ -26,6 +27,8 @@
cli
./overlay.nix
(final: prev: {
inherit (nix.packages.${final.system}) nix;
nixFlakes = final.nix;
lib = nixpkgs.lib.extend (final: prev: {
terranix = import (terranix + "/core");
});
Expand All @@ -51,7 +54,6 @@
|| throw "unfree not allowed: ${name}";

}) // {
mkHashiStack = import ./lib/mk-hashi-stack.nix;
lib = import ./lib { inherit nixpkgs; };
nixosModules = self.lib.importNixosModules ./modules;
};
Expand Down
12 changes: 9 additions & 3 deletions lib/clusters.nix
Expand Up @@ -21,7 +21,10 @@ rec {
../profiles/consul/policies.nix
file
];
specialArgs = { inherit self deployerPkgs; };
specialArgs = {
inherit self deployerPkgs;
inherit (self.inputs) bitte;
};
};

mkCluster = self: deployerPkgs: file:
Expand Down Expand Up @@ -69,11 +72,14 @@ rec {
../modules
(nixpkgs + "/nixos/modules/virtualisation/amazon-image.nix")
] ++ modules;
specialArgs = { inherit nodeName self deployerPkgs; };
specialArgs = {
inherit nodeName self deployerPkgs;
inherit (self.inputs) bitte;
};
};

mkClusters =
{ self, nixpkgs, system, root }:
{ self, system, root }:
let
inherit (builtins) attrNames readDir mapAttrs;
inherit (nixpkgs.lib)
Expand Down
2 changes: 2 additions & 0 deletions lib/default.nix
Expand Up @@ -12,6 +12,8 @@ let
{
inherit nixpkgs;
clusters = callLibs ./clusters.nix;
net = callLibs ./net.nix;
mkHashiStack = callLibs ./mk-hashi-stack.nix;
inherit (self.clusters) mkCluster mkClusters;

mkNixosConfigurations = clusters:
Expand Down

0 comments on commit 97e6947

Please sign in to comment.