mirror of
https://gitlab.com/TECHNOFAB/go-copilot-proxy.git
synced 2025-12-11 22:10:06 +01:00
92 lines
2.2 KiB
Nix
92 lines
2.2 KiB
Nix
|
|
{
|
||
|
|
outputs = {
|
||
|
|
flake-parts,
|
||
|
|
systems,
|
||
|
|
...
|
||
|
|
} @ inputs:
|
||
|
|
flake-parts.lib.mkFlake {inherit inputs;} {
|
||
|
|
imports = [
|
||
|
|
inputs.devenv.flakeModule
|
||
|
|
inputs.treefmt-nix.flakeModule
|
||
|
|
inputs.nix-gitlab-ci.flakeModule
|
||
|
|
];
|
||
|
|
systems = import systems;
|
||
|
|
flake = {};
|
||
|
|
perSystem = {
|
||
|
|
pkgs,
|
||
|
|
config,
|
||
|
|
...
|
||
|
|
}: {
|
||
|
|
treefmt = {
|
||
|
|
projectRootFile = "flake.nix";
|
||
|
|
programs = {
|
||
|
|
alejandra.enable = true;
|
||
|
|
mdformat.enable = true;
|
||
|
|
gofmt.enable = true;
|
||
|
|
};
|
||
|
|
};
|
||
|
|
devenv.shells.default = {
|
||
|
|
containers = pkgs.lib.mkForce {};
|
||
|
|
packages = [];
|
||
|
|
|
||
|
|
languages.go = {
|
||
|
|
enable = true;
|
||
|
|
enableHardeningWorkaround = true;
|
||
|
|
};
|
||
|
|
|
||
|
|
git-hooks.hooks = {
|
||
|
|
treefmt = {
|
||
|
|
enable = true;
|
||
|
|
packageOverrides.treefmt = config.treefmt.build.wrapper;
|
||
|
|
};
|
||
|
|
convco.enable = true;
|
||
|
|
};
|
||
|
|
};
|
||
|
|
|
||
|
|
ci = {
|
||
|
|
stages = ["build"];
|
||
|
|
jobs = {
|
||
|
|
"build" = {
|
||
|
|
stage = "build";
|
||
|
|
script = [
|
||
|
|
# sh
|
||
|
|
''
|
||
|
|
nix build .#default
|
||
|
|
''
|
||
|
|
];
|
||
|
|
};
|
||
|
|
};
|
||
|
|
};
|
||
|
|
|
||
|
|
packages = {
|
||
|
|
default = pkgs.callPackage ./package.nix {};
|
||
|
|
};
|
||
|
|
};
|
||
|
|
};
|
||
|
|
|
||
|
|
inputs = {
|
||
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||
|
|
|
||
|
|
# flake & devenv related
|
||
|
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
||
|
|
systems.url = "github:nix-systems/default-linux";
|
||
|
|
devenv.url = "github:cachix/devenv";
|
||
|
|
treefmt-nix.url = "github:numtide/treefmt-nix";
|
||
|
|
nix-gitlab-ci.url = "gitlab:technofab/nix-gitlab-ci/2.1.0?dir=lib";
|
||
|
|
};
|
||
|
|
|
||
|
|
nixConfig = {
|
||
|
|
extra-substituters = [
|
||
|
|
"https://cache.nixos.org/"
|
||
|
|
"https://nix-community.cachix.org"
|
||
|
|
"https://devenv.cachix.org"
|
||
|
|
];
|
||
|
|
|
||
|
|
extra-trusted-public-keys = [
|
||
|
|
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||
|
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||
|
|
"devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw="
|
||
|
|
];
|
||
|
|
};
|
||
|
|
}
|