1
0
Fork 0

Create flake

This commit is contained in:
Ethan Reece 2025-02-20 23:49:05 -06:00
commit 186d492ab5
Signed by: me
GPG key ID: 198E9EB433DB1B28
2 changed files with 54 additions and 0 deletions

27
flake.lock generated Normal file
View file

@ -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
}

27
flake.nix Normal file
View file

@ -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
];
};
}
);
};
}