about summary refs log tree commit diff
path: root/users/fcuny/blog/flake.nix
blob: fa39b45e7d7d3dbd38889a816ae434f3baf2a90a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{
  description = "Franck Cuny's personal website.";

  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs";
    flake-utils.url = "github:numtide/flake-utils";
  };

  outputs = { self, nixpkgs, flake-utils }:
    flake-utils.lib.eachDefaultSystem (system:
      let pkgs = nixpkgs.legacyPackages.${system};
      in {
        defaultApp = pkgs.writers.writeBashBin "run-hugo" ''
          set -e
          set -o pipefail
          export PATH=${pkgs.lib.makeBinPath [ pkgs.hugo pkgs.git ]}
          hugo server -D
        '';

        devShell =
          pkgs.mkShell { buildInputs = with pkgs; [ hugo flyctl git ]; };
      });
}