2022-12-22 23:31:21 +01:00
|
|
|
{
|
2023-10-31 16:35:30 +01:00
|
|
|
description = "srx.dev - 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";
|
2023-10-31 16:35:30 +01:00
|
|
|
dream2nix_legacy = {
|
|
|
|
url = "github:nix-community/dream2nix/c9c8689f09aa95212e75f3108788862583a1cf5a";
|
|
|
|
inputs.all-cabal-json.follows = "nixpkgs";
|
|
|
|
};
|
2023-03-30 01:14:12 +02:00
|
|
|
nix-filter.url = "github:numtide/nix-filter";
|
|
|
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
|
|
|
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-10-31 16:35:30 +01:00
|
|
|
dream2nix_legacy,
|
2023-03-30 01:14:12 +02:00
|
|
|
nix-filter,
|
|
|
|
flake-parts,
|
|
|
|
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;
|
2022-12-26 20:46:33 +01:00
|
|
|
|
2023-10-31 16:35:30 +01:00
|
|
|
imports = [
|
|
|
|
dream2nix_legacy.flakeModuleBeta
|
|
|
|
pre-commit.flakeModule
|
|
|
|
./nix/hooks.nix
|
|
|
|
./nix/package.nix
|
|
|
|
./nix/devshell.nix
|
|
|
|
];
|
2022-12-26 20:46:33 +01:00
|
|
|
|
2023-03-30 01:14:12 +02:00
|
|
|
dream2nix.config.projectRoot = ./.;
|
2022-12-26 20:46:33 +01:00
|
|
|
|
2023-03-30 01:14:12 +02:00
|
|
|
perSystem = {
|
|
|
|
config,
|
|
|
|
pkgs,
|
2023-10-31 16:35:30 +01:00
|
|
|
self',
|
|
|
|
inputs',
|
2023-03-30 01:14:12 +02:00
|
|
|
system,
|
|
|
|
...
|
|
|
|
}: {
|
2023-10-31 16:35:30 +01:00
|
|
|
apps = {
|
|
|
|
serve.program = "${pkgs.writeShellScript "serve" ''
|
|
|
|
${pkgs.miniserve}/bin/miniserve -p 3001 --index index.html ${self'.packages.default}
|
|
|
|
''}";
|
|
|
|
};
|
2022-12-26 20:46:33 +01:00
|
|
|
|
2023-10-31 16:35:30 +01:00
|
|
|
packages = {
|
|
|
|
default = self'.packages.srx_dev;
|
2022-12-22 23:31:21 +01:00
|
|
|
};
|
2023-03-30 01:14:12 +02:00
|
|
|
};
|
|
|
|
};
|
2022-12-22 23:31:21 +01:00
|
|
|
}
|