Skip to content

Commit

Permalink
move to nix flake
Browse files Browse the repository at this point in the history
  • Loading branch information
bristermitten committed Jul 18, 2023
1 parent 20b6035 commit fb90761
Show file tree
Hide file tree
Showing 4 changed files with 154 additions and 31 deletions.
6 changes: 4 additions & 2 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ of a Docker image. To build a docker image, run `nixpacks build .`

### Nix

This project also has a Nix file to set up a reproducible development
environment. To access this, run `nix-shell`.
This project also has a Nix Flake to set up a reproducible development
environment. To access this, run `nix develop`.
This is recommended for development, as it will automatically install all the dependencies you need in an isolated
environment.

## Running

Expand Down
29 changes: 0 additions & 29 deletions default.nix

This file was deleted.

98 changes: 98 additions & 0 deletions flake.lock

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

52 changes: 52 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
description = "DevDenBot";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
treefmt-nix.url = "github:numtide/treefmt-nix";

};


outputs = inputs@{ flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
imports = [
inputs.treefmt-nix.flakeModule
];
systems = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin" ];
perSystem = { config, self', inputs', pkgs, system, ... }: {
treefmt.config = {
projectRootFile = "./flake.nix";
package = pkgs.treefmt;
programs.nixpkgs-fmt.enable = true;
};

devShells.default = pkgs.mkShell {

buildInputs = with pkgs; [
nodejs-18_x

nodePackages.yarn

nodePackages.typescript
nodePackages.typescript-language-server

sentry-cli
gccStdenv
python39
deno
yarn
cairo
pango
pkg-config
nodePackages.node-gyp
libpng
librsvg
pixman

] ++ (if system == "aarch64-darwin" then [ pkgs.darwin.apple_sdk.frameworks.CoreText ] else [ ]);
};
};
flake = { };
};
}

0 comments on commit fb90761

Please sign in to comment.