From 70bf5ebc0ffe2057273b3986357ca39660ae4cbc Mon Sep 17 00:00:00 2001 From: Elisiei Yehorov Date: Tue, 12 Aug 2025 21:18:14 +0200 Subject: [PATCH] okak --- flake.nix | 8 ++++++++ odin/.envrc | 1 + odin/flake.nix | 34 ++++++++++++++++++++++++++++++++++ zig/.envrc | 1 + zig/.gitignore | 3 +++ zig/flake.nix | 36 ++++++++++++++++++++++++++++++++++++ 6 files changed, 83 insertions(+) create mode 100644 odin/.envrc create mode 100644 odin/flake.nix create mode 100644 zig/.envrc create mode 100644 zig/.gitignore create mode 100644 zig/flake.nix diff --git a/flake.nix b/flake.nix index 8caf91e..7826f42 100644 --- a/flake.nix +++ b/flake.nix @@ -13,6 +13,14 @@ path = ./go; description = "go template"; }; + zig = { + path = ./zig; + description = "zig template"; + }; + odin = { + path = ./odin; + description = "odin template"; + }; }; defaultTemplate = self.templates.go; diff --git a/odin/.envrc b/odin/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/odin/.envrc @@ -0,0 +1 @@ +use flake diff --git a/odin/flake.nix b/odin/flake.nix new file mode 100644 index 0000000..ae1a82a --- /dev/null +++ b/odin/flake.nix @@ -0,0 +1,34 @@ +{ + description = "minimal flake for odin dev"; + + inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1"; + + outputs = + inputs: + let + supportedSystems = [ + "x86_64-linux" + "aarch64-linux" + "x86_64-darwin" + "aarch64-darwin" + ]; + forEachSupportedSystem = + f: + inputs.nixpkgs.lib.genAttrs supportedSystems ( + system: + f { + pkgs = import inputs.nixpkgs { inherit system; }; + } + ); + in + { + devShells = forEachSupportedSystem ( + { pkgs }: + { + default = pkgs.mkShell { + packages = with pkgs; [ odin ]; + }; + } + ); + }; +} diff --git a/zig/.envrc b/zig/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/zig/.envrc @@ -0,0 +1 @@ +use flake diff --git a/zig/.gitignore b/zig/.gitignore new file mode 100644 index 0000000..0180838 --- /dev/null +++ b/zig/.gitignore @@ -0,0 +1,3 @@ +.zig-cache/ +zig-out/ +*.o diff --git a/zig/flake.nix b/zig/flake.nix new file mode 100644 index 0000000..9703645 --- /dev/null +++ b/zig/flake.nix @@ -0,0 +1,36 @@ +{ + description = "minimal flake for zig dev"; + + inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1"; + + outputs = + inputs: + let + supportedSystems = [ + "x86_64-linux" + "aarch64-linux" + "x86_64-darwin" + "aarch64-darwin" + ]; + forEachSupportedSystem = + f: + inputs.nixpkgs.lib.genAttrs supportedSystems ( + system: + f { + pkgs = import inputs.nixpkgs { inherit system; }; + } + ); + in + { + devShells = forEachSupportedSystem ( + { pkgs }: + { + default = pkgs.mkShell { + packages = with pkgs; [ + zig + ]; + }; + } + ); + }; +}