diff options
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..17ee24e --- /dev/null +++ b/flake.nix @@ -0,0 +1,28 @@ +{ + description = "My Go CLI Project"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; + devenv.url = "github:cachix/devenv"; + }; + + outputs = inputs@{ flake-parts, nixpkgs, ... }: + flake-parts.lib.mkFlake { inherit inputs; } { + imports = [ + inputs.devenv.flakeModule + ]; + systems = nixpkgs.lib.systems.flakeExposed; + perSystem = { config, self', inputs', pkgs, system, ... }: { + + packages.default = pkgs.hello; + + devenv.shells.go = { + packages = [ config.packages.default ]; + languages.go.enable = true; + enterShell = '' + echo this is my go project shell. + ''; + }; + }; + }; +} |
