-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathflake.nix
37 lines (33 loc) · 1.01 KB
/
flake.nix
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
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
systems.url = "github:nix-systems/default";
};
outputs = { nixpkgs, systems, ... }:
let
forAllSystems = fn: nixpkgs.lib.genAttrs
(import systems)
(system: fn nixpkgs.legacyPackages.${system});
in
{
packages = forAllSystems (pkgs: rec {
default = pkgs.callPackage ./. { };
for-production = default.override { baseUrl = "https://berkeley.mt/"; };
});
apps = forAllSystems (pkgs: {
serve = {
type = "app";
program = toString (pkgs.writers.writeBash "serve" ''
${pkgs.zola}/bin/zola serve &
${pkgs.tailwindcss}/bin/tailwindcss -i ./static/input.css -o ./static/style.css --watch
'');
};
});
devShells = forAllSystems (pkgs: {
default = pkgs.mkShell {
packages = with pkgs; [ tailwindcss zola ];
};
});
formatter = forAllSystems (pkgs: pkgs.nixpkgs-fmt);
};
}