{
  config,
  lib,
  ...
}:

let
  inherit (lib) mkDefault;
in
{
  nix = {
    # use flakes
    channel.enable = mkDefault false;

    # De-duplicate store paths using hardlinks except in containers
    # where the store is host-managed.
    optimise.automatic = mkDefault (!config.boot.isContainer);
  };
}
