From 9c5b5600ea3e8916af5715185ef57e57f36cf82b Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Sat, 10 Apr 2021 13:40:06 +0200 Subject: refactor(ops): Consistent use of depot.third_party vs. pkgs In preparation for the solution of b/108, we need to consistently use `depot.third_party` for packages that are only packed in the TVL depot and `pkgs` for things that come from nixpkgs. This commit cleans up a huge chunk of these uses in //ops Change-Id: I00faeb969eaa70760a26256274925b07998c2351 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2915 Tested-by: BuildkiteCI Reviewed-by: sterni --- ops/nixos/default.nix | 9 ++++----- ops/nixos/tvl-buildkite.nix | 4 ++-- 2 files changed, 6 insertions(+), 7 deletions(-) (limited to 'ops/nixos') diff --git a/ops/nixos/default.nix b/ops/nixos/default.nix index e6cb1a760a2e..fc3508b52919 100644 --- a/ops/nixos/default.nix +++ b/ops/nixos/default.nix @@ -6,13 +6,12 @@ # # TODO(tazjin): Find a more elegant solution for the whole module # situation. -{ lib, pkgs, depot, ... }@args: +{ depot, lib, pkgs, ... }@args: let inherit (lib) findFirst isAttrs; -in - -rec { + nixos = import "${depot.third_party.nixpkgsSrc}/nixos"; +in rec { whitby = import ./whitby/default.nix args; # System installation @@ -26,7 +25,7 @@ rec { }; }; - nixosFor = configuration: (depot.third_party.nixos { + nixosFor = configuration: (nixos { configuration = { ... }: { imports = [ baseModule diff --git a/ops/nixos/tvl-buildkite.nix b/ops/nixos/tvl-buildkite.nix index 4ea92b6eeab0..c6dcbd3bc1e8 100644 --- a/ops/nixos/tvl-buildkite.nix +++ b/ops/nixos/tvl-buildkite.nix @@ -1,5 +1,5 @@ # Configuration for the TVL buildkite agents. -{ config, depot, lib, ... }: +{ config, depot, pkgs, lib, ... }: let cfg = config.services.depot.buildkite; @@ -8,7 +8,7 @@ let # All Buildkite hooks are actually besadii, but it's being invoked # with different names. - buildkiteHooks = depot.third_party.runCommandNoCC "buildkite-hooks" {} '' + buildkiteHooks = pkgs.runCommandNoCC "buildkite-hooks" {} '' mkdir -p $out/bin ln -s ${depot.ops.besadii}/bin/besadii $out/bin/post-command ''; -- cgit 1.4.1