From f2e25856baf5efe9915ba36aeebd70793b1b95be Mon Sep 17 00:00:00 2001 From: Demetrius Semanko <143662059+DemetriusSemanko@users.noreply.github.com> Date: Sat, 7 Mar 2026 14:51:01 -0500 Subject: [PATCH] Add ruby dev flake --- .envrc | 1 + flake.lock | 27 +++++++++++++++++++++++++++ flake.nix | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 79 insertions(+) create mode 100644 .envrc create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..5380f9a --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1772773019, + "narHash": "sha256-E1bxHxNKfDoQUuvriG71+f+s/NT0qWkImXsYZNFFfCs=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "aca4d95fce4914b3892661bcb80b8087293536c6", + "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..a069350 --- /dev/null +++ b/flake.nix @@ -0,0 +1,51 @@ +{ + description = "An empty flake template that you can adapt to your own environment"; + + # Flake inputs + inputs.nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; # unstable Nixpkgs + + # Flake outputs + outputs = + { self, ... }@inputs: + + let + # The systems supported for this flake + supportedSystems = [ + "x86_64-linux" # 64-bit Intel/AMD Linux + "aarch64-linux" # 64-bit ARM Linux + "x86_64-darwin" # 64-bit Intel macOS + "aarch64-darwin" # 64-bit ARM macOS + ]; + + # Helper to provide system-specific attributes + forEachSupportedSystem = + f: + inputs.nixpkgs.lib.genAttrs supportedSystems ( + system: + f { + pkgs = import inputs.nixpkgs { inherit system; }; + } + ); + in + { + devShells = forEachSupportedSystem ( + { pkgs }: + { + default = pkgs.mkShellNoCC { + # The Nix packages provided in the environment + # Add any you need here + packages = with pkgs; [ + ruby_4_0 + rubyPackages_4_0.jekyll + ]; + + # Set any environment variables for your dev shell + env = { }; + + # Add any shell logic you want executed any time the environment is activated + shellHook = ''''; + }; + } + ); + }; +} -- 2.51.2