pleshevski.ru/flake.nix

47 lines
1.2 KiB
Nix
Raw Normal View History

{
description = "Pleshevski personal site";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
2024-07-24 17:15:05 +03:00
flake-utils.url = "github:numtide/flake-utils";
};
2024-07-24 17:15:05 +03:00
outputs = { self, nixpkgs, flake-utils }:
let
out = system:
let
inherit (builtins) substring;
pkgs = import nixpkgs { inherit system; };
version = "0.0.1+${substring 0 8 self.lastModifiedDate}_${self.shortRev or "dirty"}";
in
{
packages.default = with pkgs; stdenv.mkDerivation (finalAttrs: {
pname = "pleshevski_site";
inherit version;
src = ./.;
dontBuild = true;
installPhase = ''
mkdir -p $out
cp -r dist/* $out
'';
});
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
nodejs_22
gnumake
pnpm
nodePackages.typescript-language-server # typescript
nodePackages.vscode-langservers-extracted # html, css, json, eslint
];
};
};
2024-07-24 17:15:05 +03:00
in
flake-utils.lib.eachDefaultSystem out;
}