aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix44
1 files changed, 44 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 0000000..7bb23bb
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,44 @@
+{
+ description = "An empty flake template that you can adapt to your own environment";
+
+ # Flake inputs
+ inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*.tar.gz";
+
+ # Flake outputs
+ outputs = { self, nixpkgs }:
+ 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: nixpkgs.lib.genAttrs supportedSystems (system: f {
+ pkgs = import nixpkgs { inherit system; };
+ });
+ in
+ {
+ devShells = forEachSupportedSystem ({ pkgs }: {
+ default = pkgs.mkShell {
+ # The Nix packages provided in the environment
+ # Add any you need here
+ packages = with pkgs; [
+ gcc
+ stdenv.cc
+ man-pages
+ gdb
+ ];
+
+ # Set any environment variables for your dev shell
+ env = { };
+
+ # Add any shell logic you want executed any time the environment is activated
+ shellHook = ''
+ '';
+ };
+ });
+ };
+}