feat: add nix package, module, and container

Signed-off-by: seth <getchoo@tuta.io>
This commit is contained in:
seth 2023-12-03 04:14:20 -05:00
parent 45403e9d9b
commit e928eb67df
No known key found for this signature in database
GPG key ID: D31BD0D494BBEE86
7 changed files with 497 additions and 67 deletions

View file

@ -3,44 +3,41 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
naersk = {
url = "github:nix-community/naersk";
inputs.nixpkgs.follows = "nixpkgs";
};
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
pre-commit-hooks = {
url = "github:cachix/pre-commit-hooks.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-root.url = "github:srid/flake-root";
proc-flake.url = "github:srid/proc-flake";
};
outputs = {
flake-parts,
pre-commit-hooks,
...
} @ inputs:
flake-parts.lib.mkFlake {inherit inputs;} {
outputs = {parts, ...} @ inputs:
parts.lib.mkFlake {inherit inputs;} {
imports = [
pre-commit-hooks.flakeModule
];
./nix/dev.nix
./nix/packages.nix
./nix/deployment.nix
perSystem = {
config,
lib,
pkgs,
...
}: {
pre-commit.settings.hooks = {
alejandra.enable = true;
prettier = {
enable = true;
excludes = ["flake.lock" "pnpm-lock.yaml"];
};
};
devShells.default = pkgs.mkShell {
shellHook = ''
${config.pre-commit.installationScript}
'';
packages = with pkgs; [nodePackages.pnpm redis];
};
formatter = pkgs.alejandra;
};
inputs.pre-commit-hooks.flakeModule
inputs.flake-root.flakeModule
inputs.proc-flake.flakeModule
];
systems = [
"x86_64-linux"