-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathflake.nix
More file actions
43 lines (36 loc) · 994 Bytes
/
flake.nix
File metadata and controls
43 lines (36 loc) · 994 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
devshell.url = "github:numtide/devshell";
};
outputs = inputs@{ flake-parts, ... }: flake-parts.lib.mkFlake { inherit inputs; } ({ self, ... }: {
systems = [
"aarch64-darwin"
"aarch64-linux"
"x86_64-darwin"
"x86_64-linux"
];
imports = [
inputs.devshell.flakeModule
];
perSystem = { pkgs, lib, config, ... }: {
packages.default = pkgs.stdenvNoCC.mkDerivation {
pname = "plug-website";
version = if (self ? rev) then self.rev else "unstable";
src = lib.cleanSource ./.;
nativeBuildInputs = with pkgs; [
hugo
];
buildPhase = ''
hugo
cp -r ./public $out
'';
};
devshells.default.devshell = {
name = "plug-website";
packagesFrom = [ config.packages.default ];
};
};
});
}