From 02e661890aa21002ce5cc33b38502a8d34014162 Mon Sep 17 00:00:00 2001 From: Rouven Seifert Date: Sat, 2 Mar 2024 18:50:08 +0100 Subject: [PATCH] nix: restructure flake and add devshell --- flake.nix | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index 71d5959..d13aa7b 100755 --- a/flake.nix +++ b/flake.nix @@ -32,12 +32,31 @@ , print-interface , ... }@inputs: + let + supportedSystems = [ "x86_64-linux" ]; + forAllSystems = nixpkgs.lib.genAttrs supportedSystems; + pkgs = forAllSystems (system: nixpkgs.legacyPackages.${system}); + in { - packages."x86_64-linux".quitte = self.nixosConfigurations.quitte.config.system.build.toplevel; - packages."x86_64-linux".default = self.packages."x86_64-linux".quitte; - formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixpkgs-fmt; - hydraJobs."x86-64-linux".quitte = self.packages."x86_64-linux".quitte; + packages = forAllSystems (system: rec { + default = quitte; + quitte = self.nixosConfigurations.quitte.config.system.build.toplevel; + tomate = self.nixosConfigurations.tomate.config.system.build.toplevel; + }); + formatters = forAllSystems (system: rec { + default = pkgs.${system}.nixpkgs-fmt; + }); + hydraJobs = forAllSystems (system: { + quitte = self.packages.${system}.quitte; + }); + devShells = forAllSystems (system: { + default = pkgs.${system}.mkShell { + packages = with pkgs.${system}; [ + sops + ]; + }; + }); overlays.default = import ./overlays; nixosConfigurations = { quitte = nixpkgs.lib.nixosSystem {