diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..74d84a7 --- /dev/null +++ b/.envrc @@ -0,0 +1,2 @@ +use flake +export SHELL=$(which bash) diff --git a/.gitignore b/.gitignore index 51fc4ea..c9c45c1 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ 1password-credentials.json +.direnv diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..cc4ee59 --- /dev/null +++ b/flake.lock @@ -0,0 +1,60 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1732030272, + "narHash": "sha256-gbBICByjt1UDdRhv5BM0J5aKmA3PCF/Wj9b3RWabtUE=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "f89fd475c539369dae474126b4d82ec87fbb2a1d", + "type": "github" + }, + "original": { + "owner": "nixos", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..e2ae7b6 --- /dev/null +++ b/flake.nix @@ -0,0 +1,31 @@ +{ + description = "Flake to work with homelab setup"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, nixpkgs, flake-utils, ... }: flake-utils.lib.eachDefaultSystem (system: + let + # Import nixpkgs to access packages + pkgs = import nixpkgs { inherit system; }; + + # Define the devshell + devShell = pkgs.mkShell { + buildInputs = with pkgs; [ + helmfile + kubernetes-helm + kubernetes-helmPlugins.helm-diff + kubectl + + # Adding node for copilot + nodejs_20 + ]; + }; + in { + # Define the devShell for the current system + devShell = devShell; + } + ); +}