aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorKumar Damani <me@kumardamani.net>2024-09-16 17:08:49 +0000
committerKumar Damani <me@kumardamani.net>2024-09-16 17:08:49 +0000
commitee555ef12a86f9cfcbb0bb8c5f3bf73a82c77857 (patch)
tree3b7ac02d3abbf8c5431958b372f5f08e377314c1 /flake.nix
parent8471d7e6da08d650ccb615d1f83a5e8497d62161 (diff)
added flake to prj
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix28
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.
+ '';
+ };
+ };
+ };
+}