diff --git a/.gitignore b/.gitignore index 12b7eb0..1a0b8b6 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ *.py[co] __pycache__/ *~ +.direnv/ diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..1f03a90 --- /dev/null +++ b/flake.lock @@ -0,0 +1,85 @@ +{ + "nodes": { + "artemist-packages": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ], + "utils": [ + "utils" + ] + }, + "locked": { + "lastModified": 1699827895, + "narHash": "sha256-Fzjd9h3TDPXORNl6pek+e79eFjbmSaU4Hi/MUpjSRz4=", + "ref": "refs/heads/canon", + "rev": "763d83f15705ab6c6b033e445f96d40bc4f10eb4", + "revCount": 9, + "type": "git", + "url": "https://git.mildlyfunctional.gay/artemist/packages.git" + }, + "original": { + "type": "git", + "url": "https://git.mildlyfunctional.gay/artemist/packages.git" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1699725108, + "narHash": "sha256-NTiPW4jRC+9puakU4Vi8WpFEirhp92kTOSThuZke+FA=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "911ad1e67f458b6bcf0278fa85e33bb9924fed7e", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "artemist-packages": "artemist-packages", + "nixpkgs": "nixpkgs", + "utils": "utils" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1694529238, + "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..d77e7b9 --- /dev/null +++ b/flake.nix @@ -0,0 +1,32 @@ +{ + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; + utils.url = "github:numtide/flake-utils"; + artemist-packages = { + url = "git+https://git.mildlyfunctional.gay/artemist/packages.git"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.utils.follows = "utils"; + }; + }; + outputs = { self, nixpkgs, utils, artemist-packages }: + utils.lib.eachDefaultSystem (system: + let pkgs = import nixpkgs { inherit system; }; + in { + devShells.zephyr = + artemist-packages.devShells.${system}.zephyr.override { + toolchains = + with artemist-packages.packages.${system}.zephyr.toolchains; [ + arm-zephyr-eabi + riscv64-zephyr-elf + ]; + zephyrSrc = pkgs.fetchFromGitHub { + owner = "zephyrproject-rtos"; + repo = "zephyr"; + rev = "v3.5.0"; + hash = "sha256-72QFsKOWkF6BiP4XgZAXXSBcN4t6yvhAeXCpgCYrhe8="; + }; + }; + formatter = pkgs.nixfmt; + }); + +} diff --git a/zephyr/.envrc b/zephyr/.envrc new file mode 100644 index 0000000..f029cad --- /dev/null +++ b/zephyr/.envrc @@ -0,0 +1 @@ +use flake ..#zephyr