wiki/flake.nix

39 lines
846 B
Nix
Raw Normal View History

2023-03-31 19:43:26 +05:30
{
2023-07-11 23:07:49 +05:30
description = "wiki.adtya.xyz";
2023-03-31 19:43:26 +05:30
inputs = {
2023-11-26 19:55:37 +05:30
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
2023-07-11 23:07:49 +05:30
flake-utils.url = "github:numtide/flake-utils";
2023-03-31 19:43:26 +05:30
};
2023-11-26 19:55:37 +05:30
outputs =
{ self
, nixpkgs
, flake-utils
,
}:
2023-07-11 23:07:49 +05:30
flake-utils.lib.eachDefaultSystem (
2023-11-26 19:55:37 +05:30
system:
let
2023-03-31 19:43:26 +05:30
pkgs = import nixpkgs {
2023-07-11 23:07:49 +05:30
inherit system;
2023-03-31 19:43:26 +05:30
};
2024-01-04 18:27:38 +05:30
package = pkgs.callPackage ./default.nix { };
app = pkgs.writeShellScriptBin "app" "${pkgs.merecat}/bin/merecat -n -p 8080 ${package}/share/web";
2023-03-31 19:43:26 +05:30
in
2024-01-04 18:27:38 +05:30
{
formatter = pkgs.nixpkgs-fmt;
devShells.default = pkgs.mkShell {
packages = with pkgs; [
2023-11-26 19:55:37 +05:30
mdbook
2023-12-04 22:33:11 +05:30
tailwindcss-language-server
2023-11-26 19:55:37 +05:30
];
};
2024-01-04 18:27:38 +05:30
packages = {
inherit app;
default = package;
};
2023-11-26 19:55:37 +05:30
}
2023-03-31 19:43:26 +05:30
);
}