Error While passing multiple derivations to flake file

I was trying to package some packages as derivations using a flake. But I think that a single flake cannot include multiple packages as it throws this error.

  description = "Packaging Regolith Flake";

  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";

  outputs = { self, nixpkgs }: 
  system= "x86_64-linux";
  pkgs = nixpkgs.legacyPackages.${system};
    packages.${system}.ilia= import ./ilia/default.nix{inherit pkgs;};
    packages.${system}.i3xrocks= import ./i3xrocks/default.nix{inherit pkgs;};


❯ nix flake show
error: 'packages' is not an attribute set

File Structure

❯ exa --tree
β”œβ”€β”€ flake.lock
β”œβ”€β”€ flake.nix
β”œβ”€β”€ i3xrocks
β”‚  └── default.nix
β”œβ”€β”€ ilia
β”‚  └── default.nix
β”œβ”€β”€ regolith-displayd
β”‚  └── default.nix
β”œβ”€β”€ regolith-inputd
β”‚  └── default.nix
β”œβ”€β”€ regolith-powerd
β”‚  └── default.nix
β”œβ”€β”€ remontoire
β”‚  └── default.nix
└── rofication
   └── default.nix
1 Like