add flake support

This commit is contained in:
Osman Faruk Bayram 2025-03-15 18:09:23 +03:00
parent 3b03d1a29f
commit 4885147990
2 changed files with 48 additions and 0 deletions

27
flake.lock generated Normal file
View file

@ -0,0 +1,27 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1741865919,
"narHash": "sha256-4thdbnP6dlbdq+qZWTsm4ffAwoS8Tiq1YResB+RP6WE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "573c650e8a14b2faa0041645ab18aed7e60f0c9a",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

21
flake.nix Normal file
View file

@ -0,0 +1,21 @@
{
description = "osbm.dev astro website";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
outputs = { nixpkgs, ...}:
let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
in
{
defaultPackage.x86_64-linux = pkgs.stdenv.mkDerivation {
name = "osbm.dev";
src = ./.;
buildInputs = [ pkgs.nodejs ];
installPhase = ''
mkdir -p $out
cp -r * $out
'';
};
};
}