add flake.nix

This commit is contained in:
Denis Lehmann 2021-08-23 19:01:50 +02:00
parent 78ac32ebdd
commit 8c399a8494
2 changed files with 69 additions and 0 deletions

29
flake.nix Normal file
View file

@ -0,0 +1,29 @@
{
description = "Socialize web page";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem
(system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
# Package
packages.socialize =
pkgs.stdenv.mkDerivation {
name = "socialize";
src = self;
installPhase = ''
install -m 444 -D index.html $out/index.html
install -m 444 -D favicon.png $out/favicon.png
'';
};
defaultPackage = self.packages.${system}.socialize;
}
);
}