srx.astro.nix/flake.nix

50 lines
1 KiB
Nix
Raw Normal View History

2022-12-22 23:31:21 +01:00
{
2024-03-03 13:45:20 +01:00
description = "srx.digital - Website";
2023-03-30 01:14:12 +02:00
2022-12-22 23:31:21 +01:00
inputs = {
2023-03-30 01:14:12 +02:00
nixpkgs.url = "github:nixos/nixpkgs?ref=nixpkgs-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
2024-03-03 13:45:20 +01:00
nix-filter.url = "github:numtide/nix-filter";
2023-03-30 01:14:12 +02:00
pre-commit.url = "github:cachix/pre-commit-hooks.nix";
2022-12-22 23:31:21 +01:00
};
2023-03-30 01:14:12 +02:00
2022-12-22 23:31:21 +01:00
outputs = {
2023-03-30 01:14:12 +02:00
flake-parts,
2024-03-03 13:45:20 +01:00
nix-filter,
2023-03-30 01:14:12 +02:00
pre-commit,
2022-12-22 23:31:21 +01:00
...
2023-03-30 01:14:12 +02:00
} @ inputs: let
systems = ["x86_64-linux" "aarch64-linux"];
in
flake-parts.lib.mkFlake {inherit inputs;} {
inherit systems;
imports = [
pre-commit.flakeModule
./nix/hooks.nix
./nix/devshell.nix
2024-03-03 13:45:20 +01:00
./nix/package.nix
];
2023-03-30 01:14:12 +02:00
perSystem = {
config,
pkgs,
self',
inputs',
2023-03-30 01:14:12 +02:00
system,
...
}: {
apps = {
serve.program = "${pkgs.writeShellScript "serve" ''
${pkgs.miniserve}/bin/miniserve -p 3001 --index index.html ${self'.packages.default}
''}";
};
packages = {
2024-03-03 13:45:20 +01:00
default = self'.packages.srx-digital;
2022-12-22 23:31:21 +01:00
};
2023-03-30 01:14:12 +02:00
};
};
2022-12-22 23:31:21 +01:00
}