Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Configuration Examples

Complete 5G Core Setup

{
  description = "Open5GS AMF YAML generator";
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    nixcore = {
      url = "git+https://gitlab.flux.utah.edu/nixcore/nixcore.git";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };

  outputs = {
    nixpkgs,
    nixcore,
    ...
  }: let
    config = {
      open5gs.common.plmn = {
        mcc = "888";
        mnc = "33";
      };

      amf.tai.tac = 1;

      amf.plmn_support = {
        s_nssai = [{sst = 1;}];
      };
    };

    systems = [
      "x86_64-linux"
      "aarch64-linux"
      "x86_64-darwin"
      "aarch64-darwin"
    ];

    forAllSystems = nixpkgs.lib.genAttrs systems;
  in {
    packages = forAllSystems (system: let
      ogs = nixcore.packages.${system}.mkOgsPkg config;
    in {
      inherit ogs;
      default = ogs;
    });
  };
}