diff --git a/flake.nix b/flake.nix index 26ff251..d652f79 100644 --- a/flake.nix +++ b/flake.nix @@ -5,40 +5,40 @@ nixpkgs.url = github:nixos/nixpkgs/nixos-23.05; }; - outputs = { - self, - nixpkgs, - }: let - supportedSystems = ["x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"]; - forAllSystems = nixpkgs.lib.genAttrs supportedSystems; - pkgs = forAllSystems (system: nixpkgs.legacyPackages.${system}); - in { - # Formatter - formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra); + outputs = { self, nixpkgs }: + let + supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ]; + forAllSystems = nixpkgs.lib.genAttrs supportedSystems; + pkgs = forAllSystems (system: nixpkgs.legacyPackages.${system}); + in { - # Packages - packages = forAllSystems (system: { - default = pkgs.${system}.poetry2nix.mkPoetryApplication {projectDir = self;}; - }); + # Formatter + formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra); - # Dev Shell - devShells = forAllSystems (system: { - default = pkgs.${system}.mkShellNoCC { - shellHook = "Welcome to your nix-powered dev environment for dyn-gandi!"; + # Packages + packages = forAllSystems (system: { + default = pkgs.${system}.poetry2nix.mkPoetryApplication { projectDir = self; }; + }); - packages = with pkgs.${system}; [ - (poetry2nix.mkPoetryEnv {projectDir = self;}) - poetry - ]; - }; - }); + # Dev Shell + devShells = forAllSystems (system: { + default = pkgs.${system}.mkShellNoCC { + shellHook = "Welcome to your nix-powered dev environment for dyn-gandi!"; - # Run as apps - apps = forAllSystems (system: { - default = { - program = "${self.packages.${system}.default}/bin/dyn_gandi"; - type = "app"; - }; - }); - }; + packages = with pkgs.${system}; [ + (poetry2nix.mkPoetryEnv { projectDir = self; }) + poetry + ]; + + }; + }); + + # Run as apps + apps = forAllSystems (system: { + default = { + program = "${self.packages.${system}.default}/bin/dyn_gandi"; + type = "app"; + }; + }); + }; }