{ inputs = { nixpkgs.url = "github:nixos/nixpkgs"; flake-parts.url = "github:hercules-ci/flake-parts"; git-hooks.url = "github:cachix/git-hooks.nix"; vpnconfinement.url = "github:Maroka-chan/VPN-Confinement"; }; outputs = { self, nixpkgs, flake-parts, git-hooks, ... }@inputs: flake-parts.lib.mkFlake { inherit inputs; } { systems = [ "x86_64-linux" ]; flake = { nixosModules = { agregators = { imports = [ ./nix/default.nix inputs.vpnconfinement.nixosModules.default ]; }; default = self.nixosModules.agregators; }; }; perSystem = { system, ... }: let pkgs = import nixpkgs { inherit system; config.allowUnfree = true; }; pre-commit-check = git-hooks.lib.${system}.run { src = ./.; hooks = { nixfmt.enable = true; gofmt.enable = true; }; }; music-agregator = pkgs.callPackage ./package.nix { }; in { formatter = pkgs.nixfmt-tree; packages = { default = music-agregator; music-agregator = music-agregator; }; checks = { inherit pre-commit-check; simple-test = pkgs.callPackage ./tests/simple-test.nix { nixosModules = self.nixosModules; }; }; devShells.default = pkgs.mkShell { inherit (pre-commit-check) shellHook; buildInputs = with pkgs; [ pre-commit gitleaks plantuml just nixd bruno buf protobuf protoc-gen-go protoc-gen-go-grpc grpcurl go gopls gotools go-tools opencode ]; }; }; }; }