Add ability to be imported as flake input

This commit is contained in:
2025-08-19 21:44:28 +03:00
parent 44d51f2059
commit 0dc4eb8eb3
2 changed files with 24 additions and 47 deletions

34
flake.lock generated
View File

@@ -1,23 +1,5 @@
{
"nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1755186698,
@@ -33,24 +15,8 @@
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",

View File

@@ -1,20 +1,31 @@
{
description = "nothing.run website";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = {
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem
(
system: let
}: let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in {
devShells.default = pkgs.mkShell {
packages = with pkgs;[nodejs];
devShells.x86_64-linux.default = pkgs.mkShell {
packages = with pkgs; [ nodejs ];
};
website = ./dist;
packages.x86_64-linux.default = pkgs.stdenv.mkDerivation {
pname = "website";
version = "0.1.0";
src = ./.;
buildPhase = ''
npm --version
echo 'Running "npm install"'
npm install
echo 'Running "npm run build"'
npm run build
'';
buildInputs = [ pkgs.nodejs ];
};
};
}
);
}