{ description = "A basic gomod2nix flake"; inputs.nixpkgs.url = "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.zst"; inputs.gomod2nix.url = "github:nix-community/gomod2nix"; inputs.gomod2nix.inputs.nixpkgs.follows = "nixpkgs"; outputs = { self, nixpkgs, gomod2nix, }: let supportedSystems = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" ]; forAllSystems = nixpkgs.lib.genAttrs supportedSystems; in { packages = forAllSystems ( system: let pkgs = import nixpkgs { inherit system; }; in { default = pkgs.callPackage ./nix/pkg.nix { inherit (gomod2nix.legacyPackages.${system}) buildGoApplication; }; } ); devShells = forAllSystems ( system: let pkgs = import nixpkgs { inherit system; }; in { default = pkgs.callPackage ./nix/shell.nix { inherit (gomod2nix.legacyPackages.${system}) mkGoEnv gomod2nix; }; } ); overlays = { default = final: prev: { elgit = self.packages.${final.system}.default; }; }; nixosModules.elgit = import ./nix/nixos-module.nix; }; }