add nix flake
parent
16c0e8c0ae
commit
af4c29d542
@ -0,0 +1,75 @@
|
||||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"locked": {
|
||||
"lastModified": 1667077288,
|
||||
"narHash": "sha256-bdC8sFNDpT0HK74u9fUkpbf1MEzVYJ+ka7NXCdgBoaA=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "6ee9ebb6b1ee695d2cacc4faa053a7b9baa76817",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "flake-utils",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"flake-utils-plus": {
|
||||
"locked": {
|
||||
"lastModified": 1667077288,
|
||||
"narHash": "sha256-bdC8sFNDpT0HK74u9fUkpbf1MEzVYJ+ka7NXCdgBoaA=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "6ee9ebb6b1ee695d2cacc4faa053a7b9baa76817",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1667142599,
|
||||
"narHash": "sha256-OLJxsg9VqfKjFkerOxWtNIkibsCvxsv5A8wNWO1MeWk=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "412b9917cea092f3d39f9cd5dead4effd5bc4053",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"papermod": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1662202785,
|
||||
"narHash": "sha256-hz6uONOyRLErNYtNG6wEnXQ23W4nlC0Imgcc5m3rmf0=",
|
||||
"owner": "adityatelange",
|
||||
"repo": "hugo-PaperMod",
|
||||
"rev": "3a0a4811cbc07c0bea09ef55b3c1bfb39b48cddd",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "adityatelange",
|
||||
"repo": "hugo-PaperMod",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"flake-utils-plus": "flake-utils-plus",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"papermod": "papermod"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
{
|
||||
inputs = {
|
||||
nixpkgs.url = github:NixOS/nixpkgs/nixos-unstable;
|
||||
flake-utils-plus.url = github:numtide/flake-utils;
|
||||
|
||||
# Website template
|
||||
papermod = {
|
||||
url = github:adityatelange/hugo-PaperMod;
|
||||
flake = false;
|
||||
};
|
||||
};
|
||||
|
||||
outputs = inputs@{ self, nixpkgs, flake-utils, papermod, ... }:
|
||||
{
|
||||
overlay = final: prev: {
|
||||
n0emis-eu-website = with final; stdenv.mkDerivation {
|
||||
name = "n0emis-eu";
|
||||
src = self;
|
||||
buildInputs = [ hugo ];
|
||||
buildPhase = ''
|
||||
mkdir -p themes
|
||||
ln -s ${papermod} themes/PaperMod
|
||||
hugo --minify
|
||||
'';
|
||||
installPhase = ''
|
||||
cp -r public $out
|
||||
'';
|
||||
};
|
||||
};
|
||||
} // (
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [ self.overlay ];
|
||||
};
|
||||
in {
|
||||
packages.leona-is-website = pkgs.n0emis-eu-website;
|
||||
defaultPackage = pkgs.n0emis-eu-website;
|
||||
devShell = pkgs.mkShell {
|
||||
packages = with pkgs; [
|
||||
hugo
|
||||
];
|
||||
};
|
||||
}
|
||||
)
|
||||
);
|
||||
}
|
Loading…
Reference in New Issue