Hacker symbol

May 29, 2024 ~ 1 min read

Flakes Custom Nixpkgs



# part of flake.nix
{
  inputs = {...};
  let
    unstable = import nixpkgs-unstable {...};
    legacy = import nixpkgs-legacy {...};
  in
    nixosConfigurations.laptop = nixpkgs.lib.nixosSystem {
      system = "x86_64-linux";
      specialArgs = { inherit inputs, unstable, legacy; };
      modules = [
        ./configuration.nix
      ];
}

# configuration.nix
{self, inputs, pkgs, unstable, legacy, ...} : {
  environment.systemPackages = [ unstable.foo legacy.bar pkgs.baz ];
}

Sebastian BolaƱos

Hi, I'm Sebastian. I'm a software developer from Costa Rica. You can follow me on Twitter. I enjoy working on distributed systems.