Skip to content

Commit

Permalink
irrigation flake
Browse files Browse the repository at this point in the history
  • Loading branch information
xyven1 committed Nov 23, 2023
1 parent 53a956d commit cafdd8e
Show file tree
Hide file tree
Showing 3 changed files with 97 additions and 0 deletions.
1 change: 1 addition & 0 deletions irrigation-controller/.envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
60 changes: 60 additions & 0 deletions irrigation-controller/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 36 additions & 0 deletions irrigation-controller/flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
description = "PlatfomIO Develop Environment";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
};

outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem
(system:
let
pkgs = nixpkgs.legacyPackages.${system};

my-python = pkgs.python3;
python-with-my-packages = my-python.withPackages (p: with p;
[
pip
]);
in
{
devShells.default = pkgs.mkShell {
buildInputs = [
python-with-my-packages
] ++ (with pkgs; [
platformio
esptool
]);

shellHook = ''
PYTHONPATH=${python-with-my-packages}/${python-with-my-packages.sitePackages}
'';
};
}
);
}

0 comments on commit cafdd8e

Please sign in to comment.