-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflake.nix
61 lines (47 loc) · 1.8 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
{
description = "Personal homepage (frederic.menou.me)";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
gitignore.url = "github:hercules-ci/gitignore.nix";
gitignore.inputs.nixpkgs.follows = "nixpkgs";
posix-toolbox.url = "github:ptitfred/posix-toolbox";
easy-ps.url = "github:justinwoo/easy-purescript-nix";
};
outputs = { nixpkgs, gitignore, posix-toolbox, easy-ps, ... }:
let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system overlays; };
overlay = import pkgs/overlay.nix;
overlays = [
gitignore.overlay
posix-toolbox.overlays.default
(_: _: { easy-ps = easy-ps.packages.${system}; })
overlay
];
website-full = baseUrl: (pkgs.ptitfred.website.nginx.override { inherit baseUrl; }).root;
tests = pkgs.callPackage ./tests { inherit nixosModule; };
nixosModule = import ./nixos { inherit overlays; };
inherit (pkgs.ptitfred) zola;
inherit (pkgs.ptitfred.lib) mkApps mkChecks;
inherit (pkgs.posix-toolbox) nix-linter;
in
{
nixosModules.default = nixosModule;
# function used in the `deploy-from-flake`
website.default = website-full;
packages.${system} = {
inherit (pkgs.ptitfred) take-screenshots check-screenshots;
integration-tests = tests.in-nginx;
};
apps.${system} = mkApps {
check-links = "${zola.check}";
dev-server = "${zola.dev-server}";
lint = "${nix-linter}/bin/nix-linter";
tests = "${tests.screenshots}/bin/test-screenshots";
};
checks.${system} = mkChecks {
lint-nix = "${nix-linter}/bin/nix-linter ${./.}";
};
devShells.${system}.default = pkgs.callPackage ./shell.nix {};
};
}