{ description = "Nix Hamburg User Group Flake"; inputs = { nixpkgs.url = "github:nixos/nixpkgs?ref=nixpkgs-unstable"; d2n.url = "github:nix-community/dream2nix"; d2n.inputs.all-cabal-json.follows = "nixpkgs"; nix-filter.url = "github:numtide/nix-filter"; flake-utils.url = "github:numtide/flake-utils"; flake-parts.url = "github:hercules-ci/flake-parts"; pre-commit.url = "github:cachix/pre-commit-hooks.nix"; }; outputs = { d2n, self, nix-filter, flake-parts, flake-utils, pre-commit, ... } @ inputs: let systems = ["x86_64-linux" "aarch64-linux"]; in flake-parts.lib.mkFlake {inherit inputs;} { inherit systems; imports = [d2n.flakeModuleBeta pre-commit.flakeModule ./nix/site.nix ./nix/hooks.nix]; dream2nix.config.projectRoot = ./.; perSystem = { self', config, pkgs, system, ... }: { apps.serve.program = "${pkgs.writeShellScript "serve" '' ${pkgs.miniserve}/bin/miniserve -p 3001 --index index.html ${self'.packages.default} ''}"; packages.default = self'.packages.nix-hh-website; devShells.default = pkgs.mkShell { packages = builtins.attrValues { inherit (pkgs) nodejs yarn; inherit (pkgs) alejandra nil; }; shellHook = config.pre-commit.installationScript; }; }; } // flake-utils.lib.eachSystem ["aarch64-linux" "x86_64-linux"] (localSystem: { hydraJobs = { build = { inherit (self.packages.${localSystem}) nix-hh-website; }; }; }); }