2020-06-07 14:03:12 +00:00
|
|
|
# SPDX-FileCopyrightText: 2020 Luke Granger-Brown <depot@lukegb.com>
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
2021-09-05 09:21:41 +00:00
|
|
|
{ depot, system, ... }@ch:
|
2020-11-01 21:22:52 +00:00
|
|
|
let
|
|
|
|
nixpkgsConfig = {
|
|
|
|
allowUnfree = true;
|
2022-10-02 21:23:44 +00:00
|
|
|
checkMeta = false;
|
2020-11-01 21:22:52 +00:00
|
|
|
permittedInsecurePackages = [
|
2023-08-19 21:13:16 +00:00
|
|
|
"nodejs-16.20.2" # for openvscode-server
|
2023-10-12 20:13:32 +00:00
|
|
|
|
|
|
|
# for authentik?
|
|
|
|
"python3.10-requests-2.29.0"
|
|
|
|
"python3.10-cryptography-40.0.2"
|
|
|
|
"python3.11-requests-2.29.0"
|
|
|
|
"python3.11-cryptography-40.0.2"
|
2020-11-01 21:22:52 +00:00
|
|
|
];
|
2020-11-24 02:53:33 +00:00
|
|
|
packageOverrides = pkgs: {
|
|
|
|
factorio = pkgs.factorio.override depot.ops.secrets.factorio;
|
|
|
|
factorio-experimental = pkgs.factorio-experimental.override depot.ops.secrets.factorio;
|
2023-01-17 22:57:29 +00:00
|
|
|
ntfy = (pkgs.ntfy.override {
|
|
|
|
withXmpp = false;
|
2023-07-01 15:48:46 +00:00
|
|
|
withSlack = false;
|
|
|
|
python39 = pkgs.python3;
|
2023-01-17 22:57:29 +00:00
|
|
|
}).overridePythonAttrs (oldAttrs: {
|
|
|
|
doCheck = false;
|
|
|
|
checkPhase = "";
|
|
|
|
});
|
2022-04-13 12:03:56 +00:00
|
|
|
delve = pkgs.delve.overrideAttrs (oldAttrs: {
|
|
|
|
meta = oldAttrs.meta // {
|
|
|
|
platforms = oldAttrs.meta.platforms ++ [ "aarch64-linux" ];
|
|
|
|
};
|
|
|
|
});
|
2020-11-24 02:53:33 +00:00
|
|
|
};
|
2020-11-01 21:22:52 +00:00
|
|
|
};
|
2020-05-31 17:58:29 +00:00
|
|
|
nixpkgs = import ./nixpkgs {
|
2021-09-05 09:21:41 +00:00
|
|
|
inherit system;
|
2020-05-31 17:58:29 +00:00
|
|
|
config = nixpkgsConfig;
|
|
|
|
};
|
2020-11-01 21:22:52 +00:00
|
|
|
crate2nixSrc = nixpkgs.fetchFromGitHub {
|
|
|
|
owner = "kolloch";
|
|
|
|
repo = "crate2nix";
|
|
|
|
rev = "e07af104b8e41d1cd7e41dc7ac3fdcdf4953efae";
|
|
|
|
hash = "sha256:07syygn1rc5n1big7hf42pzgm5wc1r0mzglzvlbcb7rkzgqqhbqx";
|
|
|
|
};
|
2021-03-21 18:52:09 +00:00
|
|
|
naerskSrc = nixpkgs.fetchFromGitHub {
|
|
|
|
owner = "nmattia";
|
|
|
|
repo = "naersk";
|
|
|
|
rev = "e0fe990b478a66178a58c69cf53daec0478ca6f9";
|
|
|
|
sha256 = "sha256:0qjyfmw5v7s6ynjns4a61vlyj9cghj7vbpgrp9147ngb1f8krz2c";
|
|
|
|
};
|
2023-11-19 20:12:35 +00:00
|
|
|
poetry2nixSrc = nixpkgs.fetchFromGitHub {
|
|
|
|
owner = "nix-community";
|
|
|
|
repo = "poetry2nix";
|
|
|
|
rev = "ec4364021900f8e0d425d901b6e6ff03cf201efb";
|
|
|
|
sha256 = "02q3jwj3m78bxh9fdg33khx8w3bcxgsci5qa8ps76vkyhihy20py";
|
|
|
|
};
|
2022-05-21 17:03:00 +00:00
|
|
|
|
2023-03-12 14:20:06 +00:00
|
|
|
tvlDepot = import ./tvl { nixpkgsBisectPath = ./nixpkgs; inherit nixpkgsConfig; nixpkgsSystem = system; };
|
2020-11-01 21:22:52 +00:00
|
|
|
in
|
|
|
|
rec {
|
2022-12-04 04:24:37 +00:00
|
|
|
inherit nixpkgsConfig nixpkgs;
|
2020-04-30 04:49:19 +00:00
|
|
|
nixos = import ./nixpkgs/nixos;
|
2020-05-08 22:26:21 +00:00
|
|
|
nixeval = import ./nixpkgs/nixos/lib/eval-config.nix;
|
2020-10-04 00:04:18 +00:00
|
|
|
buildGo =
|
2022-11-01 00:23:46 +00:00
|
|
|
let orig = import ./tvl/nix/buildGo { pkgs = nixpkgs; inherit gopkgs; };
|
2020-10-04 00:04:18 +00:00
|
|
|
in orig // {
|
2020-10-18 00:02:46 +00:00
|
|
|
program = { dockerData ? [], ... }@args:
|
2020-10-04 00:04:18 +00:00
|
|
|
let
|
2020-10-18 00:02:46 +00:00
|
|
|
origOut = orig.program (nixpkgs.lib.filterAttrs (n: v: n != "dockerData") args);
|
2020-10-04 00:04:18 +00:00
|
|
|
in origOut // {
|
|
|
|
dockerImage = nixpkgs.dockerTools.buildImage {
|
|
|
|
name = args.name;
|
2022-10-08 20:49:16 +00:00
|
|
|
copyToRoot = nixpkgs.buildEnv {
|
|
|
|
name = "${args.name}-env";
|
|
|
|
paths = dockerData;
|
|
|
|
};
|
2020-10-04 02:14:53 +00:00
|
|
|
config = {
|
2020-10-18 00:02:46 +00:00
|
|
|
Entrypoint = [ "${origOut}/bin/${args.name}" ];
|
2020-10-04 02:14:53 +00:00
|
|
|
Env = [
|
|
|
|
"SSL_CERT_FILE=${nixpkgs.cacert}/etc/ssl/certs/ca-bundle.crt"
|
|
|
|
];
|
|
|
|
};
|
2020-10-04 00:04:18 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
readTree = import ./tvl/nix/readTree {};
|
2022-05-21 17:03:00 +00:00
|
|
|
gopkgs = readTree {
|
|
|
|
args = ch;
|
|
|
|
path = ./gopkgs;
|
2021-03-21 18:52:09 +00:00
|
|
|
};
|
2022-05-21 17:03:00 +00:00
|
|
|
|
|
|
|
bat_syntaxes = tvlDepot.third_party.bat_syntaxes;
|
|
|
|
cheddar = tvlDepot.tools.cheddar;
|
2021-03-21 18:52:09 +00:00
|
|
|
naersk = nixpkgs.callPackage naerskSrc {};
|
|
|
|
|
2020-11-01 21:39:25 +00:00
|
|
|
crate2nix = import "${crate2nixSrc}" { pkgs = ch.depot.pkgs; };
|
2023-11-19 20:12:35 +00:00
|
|
|
|
|
|
|
poetry2nix = import "${poetry2nixSrc}" { pkgs = ch.depot.pkgs; };
|
2020-04-30 04:49:19 +00:00
|
|
|
}
|