summaryrefslogtreecommitdiff
path: root/flake.nix
blob: 152f7d0b95ae0ad93f32f6df7b34298bf30ae7d0 (plain)
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
{
  description = "tdback's website source code (tdback.net)";

  inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";

  outputs =
    { nixpkgs, ... }:
    let
      supportedSystems = [
        "aarch64-linux"
        "x86_64-linux"
      ];
      eachSystem = nixpkgs.lib.genAttrs supportedSystems;
      forPkgs =
        fn:
        nixpkgs.lib.mapAttrs (system: pkgs: (fn pkgs)) (
          nixpkgs.lib.getAttrs supportedSystems nixpkgs.legacyPackages
        );
    in
    {
      packages = forPkgs (pkgs: {
        default = pkgs.callPackage ./default.nix { };
      });

      devShells = eachSystem (
        system:
        let
          pkgs = import nixpkgs { inherit system; };
        in
        {
          default = with pkgs; mkShell {
            buildInputs = [ hugo ];
          };
        }
      );
    };
}