Skip to content

Commit

Permalink
feat: nix&nixos flake
Browse files Browse the repository at this point in the history
  • Loading branch information
Eveeifyeve committed Apr 7, 2024
1 parent 2cb6abb commit ddd3626
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
description = "Node-Project Flake";

inputs = {
nixpkgs.url = "github:cachix/devenv-nixpkgs/rolling";
devenv.url = "github:cachix/devenv";
nix2container.url = "github:nlewo/nix2container";
nix2container.inputs.nixpkgs.follows = "nixpkgs";
mk-shell-bin.url = "github:rrbutani/nix-mk-shell-bin";
};

nixConfig = {
extra-trusted-public-keys = "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw=";
extra-substituters = "https://devenv.cachix.org";
};

outputs = inputs@{ flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
imports = [
inputs.devenv.flakeModule
];
systems = [ "x86_64-linux" "i686-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
perSystem = { config, self', inputs', pkgs, system, ... }: {
packages.devenv-up = self'.devShells.default.config.procfileScript;

devenv.shells.default = {
name = "Node-Project";

# https://devenv.sh/guides/using-with-flake-parts/#import-a-devenv-module
imports = [
];

# https://devenv.sh/reference/options/
packages = [
config.packages.default
];

languages.javascript = {
enable = true;
bun = {
enable = true;
install.enable = true;
};
# PNPM If package needs PNPM but you should always try to use bun.
pnpm = {
enable = false;
install.enable = false;
};
};
};

};
flake = {
# The usual flake attributes can be defined here, including system-
# agnostic ones like nixosModule and system-enumerating ones, although
# those are more easily expressed in perSystem.

};
};
}

0 comments on commit ddd3626

Please sign in to comment.