{ description = "Nix utilities to manage koreader"; inputs = { nixpkgs.url = "github:nixos/nixpkgs"; flake-parts.url = "github:hercules-ci/flake-parts"; systems.url = "github:nix-systems/default"; treefmt-nix = { url = "github:numtide/treefmt-nix"; inputs.nixpkgs.follows = "nixpkgs"; }; }; outputs = inputs@{ self, ... }: inputs.flake-parts.lib.mkFlake { inherit inputs self; } { systems = import inputs.systems; imports = [ inputs.treefmt-nix.flakeModule ./modules ]; perSystem = { pkgs, config, system, ... }: { treefmt = { programs = { nixfmt = { enable = true; strict = true; }; }; }; devShells.default = pkgs.mkShellNoCC { inputsFrom = [ config.treefmt.build.devShell ]; nativeBuildInputs = with pkgs; [ nixd statix deadnix ]; }; koreader = { pocketbook = ./instances/pocketbook.nix; }; packages = { ko-pocketbook = pkgs.callPackage ./pkgs/pocketbook.nix { }; ko-kobo = pkgs.callPackage ./pkgs/kobo.nix { }; }; }; }; }