anchor.diff:    cephConfigOsd0 = generateCephConfig { daemonConfig = {
       osd = {
         enable = true;
  -      daemons = [ "0" ];
  +      daemons = [ cfg.osd0.name ];
       };
     }; };
   
     networkOsd1 = {
       dhcpcd.enable = false;
       interfaces.eth1.ipv4.addresses = pkgs.lib.mkOverride 0 [
  -      { address = "192.168.1.3"; prefixLength = 24; }
  +      { address = cfg.osd1.ip; prefixLength = 24; }
       ];
       firewall = {
         allowedTCPPortRanges = [ { from = 6800; to = 7300; } ];
  
positive.code: 
      # Create the ceph-related directories
      $monA->mustSucceed(
        "mkdir -p /var/lib/ceph/mgr/ceph-a",
        "mkdir -p /var/lib/ceph/mon/ceph-a",
        "chown ceph:ceph -R /var/lib/ceph/",
        "mkdir -p /etc/ceph",
        "chown ceph:ceph -R /etc/ceph"
      );
      $osd0->mustSucceed(
        "mkdir -p /var/lib/ceph/osd/ceph-0",
        "chown ceph:ceph -R /var/lib/ceph/",
        "mkdir -p /etc/ceph",
        "chown ceph:ceph -R /etc/ceph"
      );
      $osd1->mustSucceed(
        "mkdir -p /var/lib/ceph/osd/ceph-1",
        "chown ceph:ceph -R /var/lib/ceph/",
        "mkdir -p /etc/ceph",
        "chown ceph:ceph -R /etc/ceph"
  
negative.code:     );
  
      # As we disable the target in the config, we still want to test that it works as intended
      $osd0->mustSucceed("systemctl stop ceph-osd-${cfg.osd0.name}");
      $osd1->mustSucceed("systemctl stop ceph-osd-${cfg.osd1.name}");
      $monA->mustSucceed(
        "systemctl stop ceph-mgr-${cfg.monA.name}",
        "systemctl stop ceph-mon-${cfg.monA.name}"
      );
      
      $monA->succeed("systemctl start ceph.target");
      $monA->waitForUnit("ceph-mon-${cfg.monA.name}");
      $monA->waitForUnit("ceph-mgr-${cfg.monA.name}");
      $osd0->succeed("systemctl start ceph.target");
      $osd0->waitForUnit("ceph-osd-${cfg.osd0.name}");
      $osd1->succeed("systemctl start ceph.target");
      $osd1->waitForUnit("ceph-osd-${cfg.osd1.name}");
      
      $monA->succeed("ceph -s | grep 'mon: 1 daemons'");
      $monA->waitUntilSucceeds("ceph -s | grep 'quorum ${cfg.monA.name}'");
      $monA->waitUntilSucceeds("ceph osd stat | grep -e '2 osds: 2 up[^,]*, 2 in'");
      $monA->waitUntilSucceeds("ceph -s | grep 'mgr: ${cfg.monA.name}(active,'");
      $monA->waitUntilSucceeds("ceph -s | grep 'HEALTH_OK'");
    '';
  in {
    name = "basic-multi-node-ceph-cluster";
    meta = with pkgs.stdenv.lib.maintainers; {
      maintainers = [ lejonet ];
    };
  
    nodes = {
      monA = generateHost { pkgs = pkgs; cephConfig = cephConfigMonA; networkConfig = networkMonA; };
      osd0 = generateHost { pkgs = pkgs; cephConfig = cephConfigOsd0; networkConfig = networkOsd0; };
      osd1 = generateHost { pkgs = pkgs; cephConfig = cephConfigOsd1; networkConfig = networkOsd1; };
    };
  
    testScript = testscript;
  })
  