srx.astro.nix/flake.nix

73 lines
1.6 KiB
Nix
Raw Permalink 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 = {
2024-05-17 14:37:21 +02:00
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
treefmt-nix = {
url = "github:numtide/treefmt-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
2024-03-03 13:45:20 +01:00
nix-filter.url = "github:numtide/nix-filter";
2024-05-17 14:37:21 +02:00
pre-commit = {
url = "github:cachix/pre-commit-hooks.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
2022-12-22 23:31:21 +01:00
};
2023-03-30 01:14:12 +02:00
outputs =
{ self
, flake-parts
, treefmt-nix
, pre-commit
, ...
}@inputs:
let
systems = [
"x86_64-linux"
"aarch64-linux"
];
in
flake-parts.lib.mkFlake { inherit inputs; } {
2023-03-30 01:14:12 +02:00
inherit systems;
imports = [
pre-commit.flakeModule
2024-05-07 17:20:50 +02:00
treefmt-nix.flakeModule
./nix/devshell.nix
2024-05-17 14:37:21 +02:00
./nix/pre-commit.nix
2024-03-03 13:45:20 +01:00
./nix/package.nix
];
perSystem =
{ config
, pkgs
, self'
, ...
}:
{
apps = {
serve.program = "${pkgs.writeShellScript "serve" ''
${pkgs.miniserve}/bin/miniserve -p 3001 --index index.html ${self'.packages.default}
''}";
};
packages.default = self'.packages.srx-digital;
treefmt.config = {
projectRootFile = "flake.nix";
programs.nixpkgs-fmt.enable = true;
};
formatter = config.treefmt.build.wrapper;
};
flake.hydraJobs = {
inherit (self) checks packages;
2023-03-30 01:14:12 +02:00
};
};
2022-12-22 23:31:21 +01:00
}