-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
67 lines (61 loc) · 1.79 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
{
description = ''
devops-pack: devenv extensions used to hack around with common devops tooling
'';
inputs = {
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:NixOS/nixpkgs";
devenv.url = "github:cachix/devenv";
};
outputs = { nixpkgs, flake-utils, devenv, ... }@inputs:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
inherit (pkgs.lib.attrsets) mapAttrsToList;
packages = [ ];
nixosModules = {
kind = import ./src/modules/kind;
nexus = import ./src/modules/nexus;
};
devShell = devenv.lib.mkShell {
inherit inputs pkgs;
modules = [{
inherit packages;
imports = mapAttrsToList (_: value: value) nixosModules;
services = {
nexus = { enable = true; };
kind = {
enable = true;
features = {
flux = {
enable = true;
values = "";
};
argocd = {
enable = false;
values = "";
};
};
};
};
}];
};
in {
inherit nixosModules devShell;
apps = {
devops-pack-app-ok = {
type = "app";
program = toString (pkgs.writeShellScript "devops-pack-app-ok" ''
echo "devops-pack-ok ${system} $@"
'');
};
};
packages = rec {
devops-pack-package-ok =
pkgs.writeScriptBin "devops-pack-package-ok" ''
echo "devops-pack-ok ${system} $@"
'';
default = devops-pack-package-ok;
};
});
}