Skip to content
Snippets Groups Projects
Select Git revision
  • 114e4d797a852bb3a8916e531ffc1fe3adf8c794
  • develop default protected
  • production protected
  • nixpkgs-upgrade-2025-06-16
  • nixpkgs-upgrade-2024-12-23
  • 190-our-regular-updates-fill-up-the-servers-boot-partitions
  • nixpkgs-upgrade-2024-10-14
  • hro-cloud protected
  • 162.flexible-grafana-module
  • nixpkgs-upgrade-2024-05-13
  • nixpkgs-upgrade-2024-04-22
  • nixpkgs-upgrade-2024-03-25
  • nixpkgs-upgrade-2024-03-18
  • nixpkgs-upgrade-2024-03-11
  • nixpkgs-upgrade-2024-03-04
  • 163.jp-to-ben-for-prod
  • nixpkgs-upgrade-2024-02-26
  • 164.grafana-alert-rules
  • 157.authorize-new-hro-key
  • nixpkgs-upgrade-2024-02-19
  • nixpkgs-upgrade-2024-02-12
21 results

packages.nix

Blame
  • Tom Prince's avatar
    Tom Prince authored
    The current code evaluates our custom packages once for each node, which adds
    signifcant amount of time to evaluate a grid. We can reduce this, by adding the
    custom package set as an attribute to the nixpkgs set we pass to morph.
    
    This doesn't change how we refer to those packages, as we continue to expose the
    custom package set as a module attribute.
    
    These are the times to evaluate all three grids (on a partially loaded system),
    when there was nothing new to build:
    
    ```
    before:
    real	2m27.837s
    user	3m35.528s
    sys	0m3.722s
    
    after:
    real	1m12.748s
    user	1m34.047s
    sys	0m3.346s
    ```
    56372538
    History
    packages.nix 569 B
    # A NixOS module which exposes custom packages to other modules.
    { pkgs, ...}:
    let
      # Get our custom packages; either from the nixpkgs attribute added via an
      # overlay in `morph/lib/default.nix`, or by importing them directly.
      ourpkgs = pkgs.ourpkgs or (pkgs.callPackage ../pkgs {});
    in {
      config = {
        # Expose `nixos/pkgs` as a new module argument `ourpkgs`.
        _module.args.ourpkgs = ourpkgs;
        # Also expose it as a config setting, for usage by tests,
        # since the `_module` config is not exposed in the result.
        passthru.ourpkgs = ourpkgs;
      };
    }