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 }: 
  let 
  system= "x86_64-linux";
  pkgs = nixpkgs.legacyPackages.${system};
  in
  {
    packages.${system}.ilia= import ./ilia/default.nix{inherit pkgs;};
    packages.${system}.i3xrocks= import ./i3xrocks/default.nix{inherit pkgs;};
};
}

Error

❯ nix flake show
git+file:///home/<name>/Documents/flakeadd/regolith-nix
└───packages
error: 'packages' is not an attribute set

File Structure

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