From 0086af20fee1685c66f4c490a9de0ca9aed007e6 Mon Sep 17 00:00:00 2001 From: "Gustavo L de Mello (Guz)" Date: Wed, 18 Dec 2024 15:33:03 -0300 Subject: [PATCH] feat: initial commit --- flake.lock | 27 +++++++++++++++++++++++++++ flake.nix | 36 ++++++++++++++++++++++++++++++++++++ go.mod | 3 +++ 3 files changed, 66 insertions(+) create mode 100644 flake.lock create mode 100644 flake.nix create mode 100644 go.mod diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..db7b727 --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1734424634, + "narHash": "sha256-cHar1vqHOOyC7f1+tVycPoWTfKIaqkoe1Q6TnKzuti4=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "d3c42f187194c26d9f0309a8ecc469d6c878ce33", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..00e8944 --- /dev/null +++ b/flake.nix @@ -0,0 +1,36 @@ +{ + description = "My development environment"; + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + }; + outputs = {nixpkgs, ...}: let + systems = [ + "x86_64-linux" + "aarch64-linux" + "x86_64-darwin" + "aarch64-darwin" + ]; + forAllSystems = f: + nixpkgs.lib.genAttrs systems (system: let + pkgs = import nixpkgs {inherit system;}; + in + f system pkgs); + in { + devShells = forAllSystems (system: pkgs: { + default = pkgs.mkShell { + CGO_ENABLED = "0"; + hardeningDisable = ["all"]; + + buildInputs = with pkgs; [ + # Go tools + go + gofumpt + golangci-lint + golines + gotools + delve + ]; + }; + }); + }; +} diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..4a0280b --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module forge.capytal.company/loreddev/x + +go 1.23.3