From 143009ab601bfc3ef7b07bad81ac66fec743e43a Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Tue, 9 Jan 2024 17:40:55 +0000 Subject: [PATCH] Add Nix Flake for local development --- .envrc | 1 + .gitignore | 1 + flake.nix | 21 +++++++++++++++++++++ 3 files changed, 23 insertions(+) create mode 100644 .envrc 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/.gitignore b/.gitignore index 9507744..c048b66 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ +/flake.lock /output_*/ /vendor/ diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..5fa7e1b --- /dev/null +++ b/flake.nix @@ -0,0 +1,21 @@ +{ + description = "oliverdavies.uk-sculpin"; + + inputs = { + devshell.url = "github:numtide/devshell"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; + }; + + outputs = inputs@{ flake-parts, ... }: + flake-parts.lib.mkFlake { inherit inputs; } { + imports = [ inputs.devshell.flakeModule ]; + + systems = [ "x86_64-linux" ]; + + perSystem = { config, self', inputs', pkgs, system, ... }: { + devshells.default = { + packages = with pkgs; [ "php81" "php81Packages.composer" ]; + }; + }; + }; +}