aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix50
1 files changed, 50 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 0000000..b947856
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,50 @@
+{
+ inputs = {
+ nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
+ flake-utils.url = "github:numtide/flake-utils";
+ };
+
+ outputs =
+ {
+ self,
+ nixpkgs,
+ flake-utils,
+ ...
+ }:
+ let
+ shell =
+ { pkgs }:
+ pkgs.buildFHSEnv {
+ name = "daft-watch-env";
+ targetPkgs =
+ pkgs: with pkgs; [
+ (lib.hiPrio gcc)
+ platformio-core
+ avrdude
+ openocd
+ glibc
+
+ # dev
+ clang-tools
+ unixtools.xxd
+ just
+ ];
+ multiPkgs = pkgs: (with pkgs; [ udev ]);
+
+ runScript = "zsh";
+ profile = ''
+ export DIRENV_DISABLE_HOOK=1; # Dont recursively load direnv inside shell
+ export WITH_NIX_PREFIX="fhs";
+ '';
+ };
+ in
+ flake-utils.lib.eachDefaultSystem (
+ system:
+ let
+ pkgs = import nixpkgs { inherit system; };
+ in
+ {
+ devShells.default = (shell { inherit pkgs; }).env;
+ }
+ );
+}