From 186d492ab5c0213bda67850e4020f281c23eed23 Mon Sep 17 00:00:00 2001 From: Ethan Reece Date: Thu, 20 Feb 2025 23:49:05 -0600 Subject: [PATCH] Create flake --- flake.lock | 27 +++++++++++++++++++++++++++ flake.nix | 27 +++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..bad2016 --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1739866667, + "narHash": "sha256-EO1ygNKZlsAC9avfcwHkKGMsmipUk1Uc0TbrEZpkn64=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "73cf49b8ad837ade2de76f87eb53fc85ed5d4680", + "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..f3e92b6 --- /dev/null +++ b/flake.nix @@ -0,0 +1,27 @@ +{ + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + }; + + outputs = { self, nixpkgs, ... }: + let + allSystems = [ "x86_64-linux" "aarch64-linux" ]; + in + { + devShells = nixpkgs.lib.genAttrs allSystems (system: + let + pkgs = import nixpkgs { inherit system; }; + tofuPkg = pkgs.opentofu.withPlugins (p: [ + pkgs.terraform-providers.hcloud + ]); + in { + default = pkgs.mkShell { + buildInputs = [ + tofuPkg + pkgs.terraform-ls + ]; + }; + } + ); + }; +}