summaryrefslogtreecommitdiff
path: root/flake.nix
blob: 361b7a0b7a0f32a02d87f871e112668250eed69e (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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
{
  description = "Source code of Quentin Aristote's personal webpage.";

  inputs = {
    data.url = "github:qaristote/info";
    my-nixpkgs.url = "github:qaristote/my-nixpkgs";
    uncss = {
      url = "github:qaristote/uncss";
      inputs = {
        nixpkgs.follows = "/nixpkgs";
      };
    };
    nixpkgs = { };
  };

  outputs =
    {
      flake-parts,
      my-nixpkgs,
      ...
    }@inputs:
    flake-parts.lib.mkFlake { inherit inputs; } (
      { lib, ... }:
      {
        imports = builtins.attrValues { inherit (my-nixpkgs.flakeModules) personal; };

        flake.lib = import ./lib { inherit lib; };

        perSystem =
          {
            self',
            pkgs,
            system,
            ...
          }:
          let
            pkgs' = pkgs.extend (
              _: _: {
                uncss = inputs.uncss.packages."${system}".default;
                line-awesome-css = my-nixpkgs.packages."${system}".static_css_lineAwesome;
              }
            );
          in
          {
            packages = {
              default = self'.packages.webpage;
              webpage = pkgs'.callPackage ./default.nix {
                nixpkgsSrc = inputs.nixpkgs.outPath;
                src = pkgs'.callPackage ./src.nix { };
                data = inputs.data.packages."${system}".src;
              };
            };
          };
      }
    );
}