Skip to content

Commit

Permalink
Merge pull request #1015 from morucci/monitoring-flakes-shell
Browse files Browse the repository at this point in the history
Remove prometheus and grafana from default shell
  • Loading branch information
mergify[bot] authored Feb 14, 2023
2 parents ad81f7c + af63a67 commit b67c3d2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
16 changes: 12 additions & 4 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,16 @@

nixConfig = {
extra-substituters = "https://change-metrics.cachix.org";
extra-trusted-public-keys = "change-metrics.cachix.org-1:dCe8jx9vptiF6DCdZ5y2QouvDsxgFRZnbHowhPnS4C0=";
extra-trusted-public-keys =
"change-metrics.cachix.org-1:dCe8jx9vptiF6DCdZ5y2QouvDsxgFRZnbHowhPnS4C0=";
};

inputs = {
nixpkgs.url =
"github:NixOS/nixpkgs/ed014c27f4d0ca772fb57d3b8985b772b0503bbd";
hspkgs.url =
"github:podenv/hspkgs/4a25962c7beede6cfcacc66000ef783e5c98e483";
# "path:/srv/github.com/podenv/hspkgs";
# "path:/srv/github.com/podenv/hspkgs";
};

outputs = { self, nixpkgs, hspkgs }:
Expand All @@ -38,14 +39,21 @@
in {
devShell."x86_64-linux" = legacy.shell;
devShells."x86_64-linux".ci = legacy.ci-shell;
devShells."x86_64-linux".monitoring = legacy.monitoring-shell;
packages."x86_64-linux".default = legacy.monocle-exe;
packages."x86_64-linux".env = legacy.monocle-light.env;
packages."x86_64-linux".containerMonocle = legacy.containerMonocle;
packages."x86_64-linux".containerGrafana = legacy.containerGrafana;
packages."x86_64-linux".containerPrometheus = legacy.containerPrometheus;
apps."x86_64-linux".default = {
type = "app";
program = "${legacy.monocle-exe}/bin/monocle";
};
apps."x86_64-linux".prometheus = {
type = "app";
program = "${legacy.promStart}/bin/prometheus-start";
};
apps."x86_64-linux".grafana = {
type = "app";
program = "${legacy.grafanaStart}/bin/grafana-start";
};
};
}
14 changes: 4 additions & 10 deletions nix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ in rec {
- CRAWLER_TARGET
'';
};
prom-home = "/var/lib/prometheus";
prom-home = "~/.local/share/monocle/prometheus-home";
promStart = pkgs.writeScriptBin "prometheus-start" ''
${headers}
Expand Down Expand Up @@ -165,7 +165,7 @@ in rec {
};
};

grafana-home = "/var/lib/grafana";
grafana-home = "~/.local/share/monocle/grafana-home";
grafanaPromDS = pkgs.writeTextFile {
name = "prometheus.yml";
text = ''
Expand Down Expand Up @@ -302,14 +302,8 @@ in rec {
exec ${pkgs.nodejs}/bin/npm start
'';

services-req = [
elasticsearchStart
promStart
grafanaStart
monocleReplStart
monocleWebStart
monocleGhcid
];
services-req =
[ elasticsearchStart monocleReplStart monocleWebStart monocleGhcid ];

# define the base requirements
base-req = [ pkgs.bashInteractive hspkgs.coreutils pkgs.gnumake ];
Expand Down

0 comments on commit b67c3d2

Please sign in to comment.